[GH-ISSUE #356] Incrementing semver integers by more than one #4507

Closed
opened 2026-06-13 12:40:28 -05:00 by GiteaMirror · 6 comments
Owner

Originally created by @david-kershaw on GitHub (Mar 7, 2017).
Original GitHub issue: https://github.com/semver/semver/issues/356

Is it acceptable to increment a semver (2) X,Y,Z integer element by more than one? For example is this ok:

1.9.0->1.10.0->1.20.0

I notice that the 'increment of one' rule was dropped from the doc going from semver1 to semver2.

Originally created by @david-kershaw on GitHub (Mar 7, 2017). Original GitHub issue: https://github.com/semver/semver/issues/356 Is it acceptable to increment a semver (2) X,Y,Z integer element by more than one? For example is this ok: 1.9.0->1.10.0->1.20.0 I notice that the 'increment of one' rule was dropped from the doc going from semver1 to semver2.
Author
Owner

@Krinkle commented on GitHub (Mar 31, 2017):

It should have been dropped when the doc went from semver1 to semver3.

<!-- gh-comment-id:290580145 --> @Krinkle commented on GitHub (Mar 31, 2017): It should have been dropped when the doc went from semver1 to semver3.
Author
Owner

@FichteFoll commented on GitHub (Mar 31, 2017):

It doesn't state it must be incremented by one, but I don't see any reason not to. You're trying to do something that isn't necessary in semver.

<!-- gh-comment-id:290582570 --> @FichteFoll commented on GitHub (Mar 31, 2017): It doesn't state it must be incremented by one, but I don't see any reason not to. You're trying to do something that isn't necessary in semver.
Author
Owner

@sgryphon commented on GitHub (Sep 7, 2017):

The stated requirement in Semver 2.0 is to simply to increment, which is different from Semver 1.0 which was to increment by 1.

You can increment by 2, or the Fibonacci series, or whatever, and it will be compliant with SemVer 2.0

<!-- gh-comment-id:327768078 --> @sgryphon commented on GitHub (Sep 7, 2017): The stated requirement in Semver 2.0 is to simply to increment, which is different from Semver 1.0 which was to increment by 1. You can increment by 2, or the Fibonacci series, or whatever, and it will be compliant with SemVer 2.0
Author
Owner

@jwdonahue commented on GitHub (Nov 29, 2017):

Requiring increment by 1 can lead to race conditions when you have multiple projects, each adding one or more features. The current wording allows teams to coordinate. Team 1 gets 1, team 2 gets 2, etc. Maybe team 2 beats team 1 to the check-in, so it should just be ok for non-monotonic versions. You just can't allow the same version to ever be applied to more than one package.

<!-- gh-comment-id:347735293 --> @jwdonahue commented on GitHub (Nov 29, 2017): Requiring increment by 1 can lead to race conditions when you have multiple projects, each adding one or more features. The current wording allows teams to coordinate. Team 1 gets 1, team 2 gets 2, etc. Maybe team 2 beats team 1 to the check-in, so it should just be ok for non-monotonic versions. You just can't allow the same version to ever be applied to more than one package.
Author
Owner

@jwdonahue commented on GitHub (Nov 29, 2017):

@david-kershaw yes, perfectly acceptable in accordance with the spec. If this answers your question, please close this issue at your earliest possible convenience.

<!-- gh-comment-id:347736182 --> @jwdonahue commented on GitHub (Nov 29, 2017): @david-kershaw yes, perfectly acceptable in accordance with the spec. If this answers your question, please close this issue at your earliest possible convenience.
Author
Owner

@david-kershaw commented on GitHub (Nov 29, 2017):

Thanks for all the answers.

<!-- gh-comment-id:347795921 --> @david-kershaw commented on GitHub (Nov 29, 2017): Thanks for all the answers.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/semver#4507