Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#4210 closed defect (invalid)

Undefined version comparisions

Reported by: atagar Owned by:
Priority: Very Low Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Keywords: documentation spec easy tor-client
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


While writing the version parsing for stem I noticed that the version spec [1] doesn't define how to compare empty tags and patch levels. For instance, if "" is a greater or lower version than "1.2.3-myTag".

My suggestion would be to add a note that an undefined patch is zero and undefined tag equates to the empty string. Ie...

"1.2.3-myTag" == ""
"" == ""

Cheers! -Damian


Child Tickets

Change History (6)

comment:1 Changed 9 years ago by nickm

Sounds good; I'd be glad to apply a patch for that.

comment:2 Changed 9 years ago by nickm

Keywords: documentation spec easy added
Milestone: Tor: unspecified

comment:3 Changed 9 years ago by Sebastian

I think we should close this as invalid, because (and please check my reasoning!):

Empty patchlevel is already defined:

 As before, MAJOR, MINOR, MICRO,
 and PATCHLEVEL are numbers, with an absent number equivalent to 0.

It also specifies that the tag is eye-candy only:

 All versions should be distinguishable purely by those four
 numbers. The status tag is purely informational, and lets you know how
 stable we think the release is: 

From this follows that a.b.c.d must be the same as a.b.c.d- and a.b.c.d-bla.

This also means that a.b.c.d-bla is to be treated the same as a.b.c.d-bla-dev, which I think might be unintentional but is also OK: Strictly speaking, those don't constitute versions of Tor, because more than one commit has that same version.

comment:4 Changed 9 years ago by atagar

Resolution: invalid
Status: newclosed

Empty patchlevel is already defined

Ack! I'm surprised I missed that. My bad.

Agreed on both points - closing.

comment:5 Changed 8 years ago by nickm

Keywords: tor-client added

comment:6 Changed 8 years ago by nickm

Component: Tor ClientTor
Note: See TracTickets for help on using tickets.