mirror of
https://github.com/semver/semver.git
synced 2026-07-10 19:50:47 -05:00
[GH-ISSUE #308] Please allow omitting trailing .0, or document why not #2937
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 @joshtriplett on GitHub (May 22, 2016).
Original GitHub issue: https://github.com/semver/semver/issues/308
I've often seen the question raised about why semver requires a three-component version number, MAJOR.MINOR.PATCH, even if PATCH is 0. I would suggest one of two things: either document that the version number may omit the trailing .0 if PATCH is 0, or add an entry to the FAQ at the end explaining why not.
@FichteFoll commented on GitHub (May 22, 2016):
That's pretty clear to me. People not used to reading specifications will always have problems reading them.
In the purpose of a FAQ, it could make sense to add this "clarification" however.
@joshtriplett commented on GitHub (May 22, 2016):
I didn't suggest that the specification needs an update to state that this isn't allowed; the current spec very clearly disallows it. I'm suggesting that either the spec should allow this, or it should document the rationale for not allowing this.
@haacked commented on GitHub (May 23, 2016):
The rationale is documented in the spec, but not directly.
Keep in mind that SemVer describes the specification for libraries and packages. It does not dictate how you market your product. So your product is free to call itself "MyWidget 2.0" even if the library version is
2.0.0or even2.0.5.Another reason for the current rule is to keep things as simple as possible for implementers. Allowing
2.0and2.0.0to be equivalent adds unnecessary complexity. And then why not just2?@joshtriplett commented on GitHub (May 23, 2016):
@Haacked "Keeping implementations simple" seems like a completely reasonable reason. Would you consider adding the explanation you just posted (especially the second half) as a FAQ answer?
@haacked commented on GitHub (May 23, 2016):
Honestly, this is the first time this question has come up as far as I can tell. And it doesn't seem like one that comes up often. If it comes up frequently, I'll reconsider. 😄