[GH-ISSUE #634] [Question] Semver pre-release doesn't follow common format #6433

Open
opened 2026-06-17 05:13:29 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @oliv3r on GitHub (Nov 9, 2020).
Original GitHub issue: https://github.com/semver/semver/issues/634

Pre-release data, in the form of 'release-candidates' have been done using using tags for ages, and the most common versioning for pre-releases was often been '-rc1' '-rc2' etc. However in semver two it is listed as '-rc.1'. Why this change? And more importantly, when moving from the defacto standard, why ist here no rationale written and this added to the faq?

Originally created by @oliv3r on GitHub (Nov 9, 2020). Original GitHub issue: https://github.com/semver/semver/issues/634 Pre-release data, in the form of 'release-candidates' have been done using using tags for ages, and the most common versioning for pre-releases was often been '-rc1' '-rc2' etc. However in semver two it is listed as '-rc.1'. Why this change? And more importantly, when moving from the defacto standard, why ist here no rationale written and this added to the faq?
GiteaMirror added the question label 2026-06-17 05:13:29 -05:00
Author
Owner

@klehelley commented on GitHub (Nov 9, 2020):

This is a matter of coherence with the SemVer rules regarding version comparisons. It was important for them to be simple but not simplistic, as well as logical and readable.

Using the -rc<number> prerelease format, everything will work well even with a SemVer-compatible tool as long as you have less than 9 release candidates (10 if you start at zero), as rc10 < rc2. Using dots as separators and having type detection rules to allow for number comparison (instead of just string comparison) makes sure rc.2 < rc.10 in what appears to me as a coherent, elegant manner.

Ultimately, it could have been chosen to have implicit separators whenever we have a mix of alphabetical and numeric values, but the SemVer versioning scheme as it exists today has not been designed that way -- and that was a good choice IMO, I feel explicit is better than implicit in most situations.

<!-- gh-comment-id:724053509 --> @klehelley commented on GitHub (Nov 9, 2020): This is a matter of coherence with the SemVer rules regarding version comparisons. It was important for them to be simple but not simplistic, as well as logical and readable. Using the `-rc<number>` prerelease format, everything will work well even with a SemVer-compatible tool as long as you have less than 9 release candidates (10 if you start at zero), as `rc10` < `rc2`. Using dots as separators and having type detection rules to allow for number comparison (instead of just string comparison) makes sure `rc.2` < `rc.10` in what appears to me as a coherent, elegant manner. Ultimately, it could have been chosen to have implicit separators whenever we have a mix of alphabetical and numeric values, but the SemVer versioning scheme as it exists today has not been designed that way -- and that was a good choice IMO, I feel explicit is better than implicit in most situations.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/semver#6433