dale.henrichs at gemstone.com
Wed Feb 17 01:04:03 UTC 2010
Keep in mind that the only reason for being sticky on the version is to be able to sort the versions. If sorting wasn't an issue, then any old string would work...
If you want to sort, then you must have a scheme otherwise '1.10' sorts earlier that '1.9' and that is not good. In this particular instance it is only necessary to have a parsing rule for distinguishing alphabetic components from numeric components and I know that I can parse 1.0a6 correctly ... it's just a little more programming.
Haha, the scheme that I had in mind appears to match what Mozilla has done...just break the components at string and numeric boundaries where '.' is the numeric separator...There version comparison algorithm is slightly different, but I'd rather follow Mozilla than almost follow Mozilla...
If you want to use 1.0a6 style versions just say the word and I'll make it so ... as I said, I think I will be following the Mozilla scheme going forward after discussion on mailing list which will make parsing a non-issue, but in the Mozilla scheme 1.0a6 still sorts less then 1.0alpha5.
----- "Julian Fitzell" <jfitzell at gmail.com> wrote:
| On Tue, Feb 16, 2010 at 1:11 PM, Dale Henrichs
| <dale.henrichs at gemstone.com> wrote:
| > Metacello has first-class versions as well, but parsing strings is
| part of the game. Humans will be writing and reading the strings:
| > Loader load: 'ConfigurationOfSeaside' version: '2.8.4'
| > So Metacello has parsing rules for versions to convert back and
| forth between versions and strings.
| Seems like that's always going to depend on people following a
| particular convention. So either you force everyone to use the same
| convention for their projects (not likely) or accept that the
| Metacello version number may not match the project's own numbering
| character-by-character... no?
| I suppose the alternative is to track ancestry of versions somehow,
| but that's a whole other story.
| > I know that with Monticello, there never was a concrete (read
| enforced) definition for the file name. Gofer has imposed a parsing
| scheme on Monticello file names that works pretty well for calculating
| the latest file, but falls down when the creators of a Monticello
| filename use a convention that is at odds with Gofer's scheme ...
| > I want to avoid that problem with Metacello, so this early in the
| game I'm willing to change my parsing scheme.
| Sure, but is that really going to solve the problem universally (i.e.
| for projects other than Seaside)?
| > GRVersion can certainly be converted to MetacelloVersionNumber, but
| I am worried about the print string format (call me anal).
| > If you are going to write a message that says load 1.0a6 of Grease,
| then I would hope that Metacello would load '1.0a6' of Grease and that
| the sort order of versions will work (there is a load latest option in
| Metacello)....Since I've already gone and created a version called
| 1.0alpha51 I can't imagine a parser/sorter that would sort 1.0a6 later
| than 1.0alpha5.1. If you can think of one I am interested.
| Well, I can't personally imagine ever writing alpha6 in an email
| unless I was really forcing myself to. I can imagine being told to
| load a6, asking for a list of versions, and realizing that alpha6 is
| the same thing, though...
| As for parsing/sorting, Mozilla's scheme sounds like it might allow
| what you want (
| https://developer.mozilla.org/en/Toolkit_version_format ) but it may
| be a bit overkill.
| > I'm already pretty well convinced that I was overly optimistic that
| something like 1.0-a6 would fly as a version naming scheme. But I am
| willing to change and from what I can tell, you'd like to use the name
| 1.0a6 instead of 1.0alpha6, so I think I will be changing the
| ConfigurationOfGrease configs ... better now, than later.
| Well, I note that GRVersion's #greaseString is currently outputting
| 'alpha6' :) but that's just because I was using symbols for the
| #alpha, #beta, and it was easier to just output the whole thing. I
| dunno - mostly I'd just rather there was a way we didn't have to be
| sticky about strings. :)
More information about the seaside-dev