Ok so I have the impression that we could get rid of branching or use another delimiter. Would it be ok? Lukas? Dale? Stef On Jan 24, 2011, at 7:06 PM, Dale Henrichs wrote:
On 01/22/2011 12:37 AM, Stéphane Ducasse wrote:
I think that a stupid numbering like the one we have now is not so bad, you do not want to force the tools to read all the metadata inside the files. I think that we have many more places where we should improve: UI, network layer, Filesystem.....
I tend to agree, but...
So with a simple fix in the tools to follow a pattern we can get a good impact. So what is the right pattern so that Gofer and Metacello are happy?
Upon closer examination of the Metacello code, I see that for sorting and comparison operations, Metacello pretty much follows the Gofer sorting scheme (separate methods for wider range of comparison operators)... The departure from Gofer comes in how Metacello matches a package name to a working copy...
So in the end if you make Gofer happy you make Metacello happy.
Pharo/Gofer parses the package file name looking for the following pattern"
packageName, '-', author, '.', branch, '.', counter
and Squeak/GemStone parses the package file name with this pattern:
packageName, '-', 'author', '.', counter
In Squeak/GemStone, the author is allowed to contain '.' and in Pharo a '.' in the author name causes the characters following the '.' to be interpreted as a branch names and in the sorting scheme for Gofer branches have precedence over the counter....which is why Igor's seeing the "wrong sort order in Gofer".
In the Squeak/GemStone pattern, branches were indicated by a '.' in the packageName:
packageName, '.', branch, '-', author, '.', branch, '.', counter
To see examples just look at the old Seaside package names...Nothing about this ever made it into the code, but when I asked Avi way back when .. that is what he told me and I've been using it for years
In terms of trying to get Metacello to run on multiple platforms, Pharo naming scheme is a headache, because Squeak/Gemstone allows '.' in author names and Gofer parses them as branch names leading to subtle problems as we've seen
Personally, I have never seen a package in the wild that uses the Pharo 'branch' naming scheme...I have just seen problems caused by the 'branch' naming scheme.
The RepositoryInspector itself uses the meta information when it sorts so it doesn't use the package name at all and in Igor's case, CMakeVMMaker-EstebanLorenzano.15 is an ancestor of CMakeVMMaker-Igor.Stasenko.16 and shows CMakeVMMaker-Igor.Stasenko.16 as the latest version, which means that the tools are inconsistent...
My opinion is that the 'branch' naming scheme just causes problems and isn't in common use so I wouldn't mind seeing it dropped. Without the Pharo-style branch naming scheme a simple-minded sort based on the counter usually matches the actual ancestry...
With that said I have seen projects with package naming conventions that don't include author names and don't have counters, so the naming schemes for packages is just a mess...without digging in and using the actual ancestry meta information, we are guaranteed to have inconsistencies no matter what we do...
Dale