Re: Meta v2 missing information on how to compare versions

[email protected] ("Curtis Jewell")
Newsgroups perl.cpan.workers
Message-ID <[email protected]>
On Mon, 19 Apr 2010 15:38 +0300, "Michael G Schwern" <[email protected]>
wrote:
> ...
> Notes about alpha versions
> --------------------------
> DEFINITION:
> 1) Strip off the alpha version
> 2) If they are equal, the alpha version is the lesser.
> 2b) If they are both alphas, compare the alpha numbers as integers
> 3) If they are not, compare normally.
> 
> EXAMPLE:
>      1.00_01   < 1.00
>      v1.0.0_01 < v1
>      1.00_00   < 1.00
>      1.01_01   > 1.00
>      1.00_01   = 1.00_01
>      1.00_02   > 1.00_01
> 
> RECOMMENDATION: To avoid confusion, increment your version number between
> an 
> alpha release and stable.  That is, 1.2.3_1 should be followed by 1.2.4.
> 
> NOTE:  This doesn't appear to jive with version.pm.  Here's what it does:
> 1.0100 < 1.0101_01
> 1.0101 > 1.0101_00
> 1.0101 < 1.0101_01
> 
> IMO X.Y_Z should always be < than X.Y.  That is, 1.01 > 1.01_05.  This
> reads 
> 1.01_05 as "the 5th alpha release of 1.01" just like Firefox 3.6.4 beta 1
> will 
> eventually be followed by Firefox 3.6.4.

I'm sorry, but this section is just *wrong*, IMO. X.Y_Z  should always
be > X.Y. Otherwise, you've just broken (at least the release sequence
of) previous versions of the toolchain that make the assumption that a
simple s/_// gets something to compare to that works, without
version.pm. (Module::Build, for example, went 0.3603 to 0.36_04 to
0.3605 just within the past few months. I also remember perl doing
5.005_51 versions in the past during the runup to 5.6.0, as being later
than 5.00504. )

The way you're doing it, you have to increment between a release and an
alpha, as well as between an alpha and a release, or else you ruin
numerical sequence for stuff that just does the underscore removal.

You don't get 1.01_05 as "the 5th alpha release of 1.01", if, once
you're exiting the alpha sequence, you immediately increment to 1.02,
anyway.

When X.Y_Z > X.Y, this can be done:
(ascii art - may not look good with proportional fonts - Just realize
that 1.103_101 is branched off of 1.103)

1.102 ---> 1.102001 --> 1.102002 ('maint')
 \
  \---> 1.102_101 ... --> 1.102_103 --> 1.103 ('blead') ---> 1.103001
  ('new maint')
                                         \
                                          \---> 1.103_101 ('new blead')

(this is the way I'm doing Perl::Dist::WiX's numbering. It appears that
CPAN.pm also is doing something similar to this, only with 2 digit
segments instead of 3)

In this case, anything beginning with 1.102 is based off of the 1.102
"trunk" and it's branches, until the dev version turns into 1.103.

--Curtis Jewell
--
Curtis Jewell
[email protected]           http://csjewell.dreamwidth.org/
[email protected]   http://csjewell.comyr.org/perl/

"Your random numbers are not that random" -- perl-5.10.1.tar.gz/util.c

Strawberry Perl for Windows betas: http://strawberryperl.com/beta/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.