mirror of
https://github.com/semver/semver.git
synced 2026-07-11 03:53:53 -05:00
[GH-ISSUE #713] should major versions be independent or consecutive #2213
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 @Tieske on GitHub (May 28, 2021).
Original GitHub issue: https://github.com/semver/semver/issues/713
consider making another, different, breaking change to an old version, e.g.:
1.0.0introduces featuresfooandbar2.0.0removes featurefoo(only retainsbar)what's the number of a new version based of of
1.0.0, that removes featurebar, and retainsfoo?Current "expectations" would probably be that it would become version
3.0.0since, relative to2.0.0, we add featurefoo, and remove featurebar. OR it is released as a different product/api. (Option A)The alternate way of doing this would be to consider the
majorversion to be just a unique identifier, and not caring about the number being consecutive. As such it could for example be released as8.0.0. (Option B)The main difference is that Option B is more flexible from the publishers perspective, but does not define a natural "latest" version for the "consumer" of the api.
This issue came up when discussing semver/semver#712
So question is: since there is (I think) a natural expectation of major numbers to be consecutive, should the spec be updated to clarify to relation between two major numbers. I'm not proposing what it should be, just asking whether a clarification would make sense.
Edit: added the final question
@ljharb commented on GitHub (Jun 14, 2021):
@Tieske anything that's not v1 or v2. It could be v3.0.0, or v12345.0.0, but it's not compatible with v1 or v2.
It's irrelevant whether or how it's related to v1 or v2 beyond that it's a breaking change from both.
@alexandrtovmach commented on GitHub (Jun 14, 2021):
@Tieske is it helpful?
@Tieske commented on GitHub (Jun 14, 2021):
I clarified the original post by adding a question. I think what @ljharb mentioned is the same as Option B in my post. But should we add a clarification to the spec to make it more explicit?
@alexandrtovmach commented on GitHub (Jun 14, 2021):
I think this changes not required