From: Jim Weirich Date: 2006-08-23T05:30:13+09:00 Subject: Re: gem pessimistic versioning - bug? Heh, I saw Ara's email to me before I saw the responce here. Here's my reply: ara.t.howard wrote: > but why should > > 0.1.0 __not__ imply that 0.2.x is appropriate? > > according to the 'sane versioning policy' there is no reason i can think of > that it would not be? Policy is policy. The pessimistic requirement operator is mechanism. In this case, the mechanism supports the policy but does not dictate the policy. Although the recommend policy uses the major version number to denote changes in compatibility, the "~>" operator does not assume the same. It this allows it to work with other similar policies that might use a different version level. [...] >> (2) The trailing 'digit' can't be ignored. It must be equal or greater >> than the last 'digit' of the requirment. > > but that doesn't make logical sense and ignores the semantics of gem versions > though? according to the semantics any version > > 0.2.x > > is backward compatible with 0.1.x and 0.0.x Yes, but although version 0.2.3 of a library might be compatible with client software written to version 0.2.0, the reverse is not true. Client software written to version 0.2.3 will (possibly) not work with earlier versions of the library. Since it is the client software specifying the requirement, that last digit becomes important. The ~> is really two statements at once: "~> 1.2" Says: (1) There is a minimum level of functionality required, and that minimum level is version 1.2.x. Version 1.1.x will not cut it. (2) There is an assumption that any version in the 1.x series will be backwards compatible, so that version 1.99999999 is OK, but that version 2.0 is not expected to be backwards compatible and will not be accepted. -- Jim Weirich -- Posted via http://www.ruby-forum.com/.