mirror of
https://github.com/semver/semver.git
synced 2026-07-11 04:52:47 -05:00
[GH-ISSUE #10] ~ is actually useful #6983
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @anarcat on GitHub (Jan 7, 2012).
Original GitHub issue: https://github.com/semver/semver/issues/10
I see that ~ was removed as a separator, but i think it has its uses. It's actually what Debian uses to mark release candidates as being "lower" than the real release. In fact, it makes the whole thing semantically easier to compare.
Consider: a.b.c > a.b, as a general case. If we say that "dot" can separate "release candidates" strings, then this is not true if c is "rc1", for example (1.0.rc1 < 1.0), breaking the general case (for that matter, 1.0.rc1 > 1.0.0).
So I think that ~ serves a purpose and should be brought back in, which would also mean that this would be compatible with the Debian versionning.
For more information about Debian version numbers and the way they are compared, see: http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version
@timmc commented on GitHub (Jan 21, 2012):
"~" was replaced with "-", not ".". That can be compared programmatically.
@anarcat commented on GitHub (Jan 23, 2012):
I see, then it's not so bad! :) I still think it's unfortunate to needlessly diverge from an existing policy (Debian's), it would have been very useful for porters as they could have used the semver versions directly.
In Debian dash ("-") is more like semver's plus sign ("+"), which is also allowed.
@mojombo commented on GitHub (Feb 26, 2012):
I don't like Debian's versioning paradigm. It's overly complex. If you re-read the spec, I think you'll see that it covers how to compare versions very explicitly and with a small number of easy to understand rules.
In addition, Git tags cannot contain the tilde character, making it badly suited to modern development.