Metacello version comparison

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Metacello version comparison

Dale Henrichs
I would like your take on the following question about version
comparison. I don't think the following issues  actually affect any
existing configurations.

Today, when comparing a version string, the version '1.0' compares less
than '1.0.0'. I have explicit tests, so at one point in time I thought
that that made sense, but today I think that version '1.0' and version
'1.0.0' should compare equal.

By extension version '1' and and version '1.0' are equal.

I think that trailing 0 terms in a version sequence should be collapsed
before comparison.

A sequence of 0's that ends in a numeric version element should not be
collapsed. So version '1.0' is still less than '1.0.1'. No 0 collapsing
is done for version '1.0.1'.

A sequence of 0's that ends in a string version element should be
collapsed. So version '1.0.0-beta.1' is equal to version '1-beta.1'.

Thoughts ... do you care?:)

Dale
Reply | Threaded
Open this post in threaded view
|

Re: Metacello version comparison

patmaddox
On Oct 6, 2010, at 11:13 AM, Dale Henrichs wrote:

> I would like your take on the following question about version comparison. I don't think the following issues  actually affect any existing configurations.
>
> Today, when comparing a version string, the version '1.0' compares less than '1.0.0'. I have explicit tests, so at one point in time I thought that that made sense, but today I think that version '1.0' and version '1.0.0' should compare equal.
>
> By extension version '1' and and version '1.0' are equal.
>
> I think that trailing 0 terms in a version sequence should be collapsed before comparison.
>
> A sequence of 0's that ends in a numeric version element should not be collapsed. So version '1.0' is still less than '1.0.1'. No 0 collapsing is done for version '1.0.1'.
>
> A sequence of 0's that ends in a string version element should be collapsed. So version '1.0.0-beta.1' is equal to version '1-beta.1'.
>
> Thoughts ... do you care?:)
>
> Dale

Makes sense to me.

Pat
Reply | Threaded
Open this post in threaded view
|

Re: Metacello version comparison

Alexandre Bergel-5
+1


On 6 Oct 2010, at 16:09, Pat Maddox wrote:

> On Oct 6, 2010, at 11:13 AM, Dale Henrichs wrote:
>
>> I would like your take on the following question about version comparison. I don't think the following issues  actually affect any existing configurations.
>>
>> Today, when comparing a version string, the version '1.0' compares less than '1.0.0'. I have explicit tests, so at one point in time I thought that that made sense, but today I think that version '1.0' and version '1.0.0' should compare equal.
>>
>> By extension version '1' and and version '1.0' are equal.
>>
>> I think that trailing 0 terms in a version sequence should be collapsed before comparison.
>>
>> A sequence of 0's that ends in a numeric version element should not be collapsed. So version '1.0' is still less than '1.0.1'. No 0 collapsing is done for version '1.0.1'.
>>
>> A sequence of 0's that ends in a string version element should be collapsed. So version '1.0.0-beta.1' is equal to version '1-beta.1'.
>>
>> Thoughts ... do you care?:)
>>
>> Dale
>
> Makes sense to me.
>
> Pat

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.





Reply | Threaded
Open this post in threaded view
|

Re: Metacello version comparison

Miguel Cobá
In reply to this post by Dale Henrichs
El mié, 06-10-2010 a las 11:13 -0700, Dale Henrichs escribió:

> I would like your take on the following question about version
> comparison. I don't think the following issues  actually affect any
> existing configurations.
>
> Today, when comparing a version string, the version '1.0' compares less
> than '1.0.0'. I have explicit tests, so at one point in time I thought
> that that made sense, but today I think that version '1.0' and version
> '1.0.0' should compare equal.
>
> By extension version '1' and and version '1.0' are equal.
>
> I think that trailing 0 terms in a version sequence should be collapsed
> before comparison.
>
> A sequence of 0's that ends in a numeric version element should not be
> collapsed. So version '1.0' is still less than '1.0.1'. No 0 collapsing
> is done for version '1.0.1'.
>
> A sequence of 0's that ends in a string version element should be
> collapsed. So version '1.0.0-beta.1' is equal to version '1-beta.1'.
>
> Thoughts ... do you care?:)
>
> Dale

It sounds good to me.

--
Miguel Cobá
http://miguel.leugim.com.mx

Reply | Threaded
Open this post in threaded view
|

Re: Metacello version comparison

Mariano Martinez Peck

+1

On Oct 6, 2010 10:32 PM, "Miguel Cobá" <[hidden email]> wrote:

El mié, 06-10-2010 a las 11:13 -0700, Dale Henrichs escribió:

> I would like your take on the following question about version
> comparison. I don't think the fo...

It sounds good to me.

--
Miguel Cobá
http://miguel.leugim.com.mx

Reply | Threaded
Open this post in threaded view
|

Re: Metacello version comparison

Dale Henrichs
In reply to this post by Dale Henrichs
On 10/06/2010 11:13 AM, Dale Henrichs wrote:

> I would like your take on the following question about version
> comparison. I don't think the following issues  actually affect any
> existing configurations.
>
> Today, when comparing a version string, the version '1.0' compares less
> than '1.0.0'. I have explicit tests, so at one point in time I thought
> that that made sense, but today I think that version '1.0' and version
> '1.0.0' should compare equal.
>
> By extension version '1' and and version '1.0' are equal.
>
> I think that trailing 0 terms in a version sequence should be collapsed
> before comparison.
>
> A sequence of 0's that ends in a numeric version element should not be
> collapsed. So version '1.0' is still less than '1.0.1'. No 0 collapsing
> is done for version '1.0.1'.
>
> A sequence of 0's that ends in a string version element should be
> collapsed. So version '1.0.0-beta.1' is equal to version '1-beta.1'.
>
> Thoughts ... do you care?:)
>
> Dale

Excellent!

Thanks for the feedback ... I will make it so.

Dale