[GH-ISSUE #640] Incorrect Examples given Point 10(Build Metadata), Precedence is not same given different Prerelease versions. #2177

Open
opened 2026-04-20 10:09:56 -05:00 by GiteaMirror · 6 comments
Owner

Originally created by @saketGuptaTiger on GitHub (Nov 22, 2020).
Original GitHub issue: https://github.com/semver/semver/issues/640

In point 10. about build metadata, the following is written -
"Thus two versions that differ only in the build metadata, have the same precedence. Examples: 1.0.0-alpha+001, 1.0.0+20130313144700, 1.0.0-beta+exp.sha.5114f85, 1.0.0+21AF26D3—-117B344092BD."

here the precedence of "1.0.0-alpha+001" and "1.0.0-beta+exp.sha.5114f85" is not the same because there is difference in the pre-release versions that is 'alpha' and 'beta'. The resolution May be to update either of these two examples so as to match the pre-release versions.

Originally created by @saketGuptaTiger on GitHub (Nov 22, 2020). Original GitHub issue: https://github.com/semver/semver/issues/640 In point 10. about build metadata, the following is written - "Thus two versions that differ only in the build metadata, have the same precedence. Examples: 1.0.0-alpha+001, 1.0.0+20130313144700, 1.0.0-beta+exp.sha.5114f85, 1.0.0+21AF26D3—-117B344092BD." here the precedence of "1.0.0-alpha+001" and "1.0.0-beta+exp.sha.5114f85" is not the same because there is difference in the pre-release versions that is 'alpha' and 'beta'. The resolution May be to update either of these two examples so as to match the pre-release versions.
GiteaMirror added the question label 2026-04-20 10:09:56 -05:00
Author
Owner

@Nixinova commented on GitHub (Jan 12, 2021):

With the rest of the context there is no issue here. The examples are of build metadata itself, not of the precedence.

Build metadata MAY be denoted by appending a plus sign and a series of dot separated identifiers immediately following the patch or pre-release version. [...] Examples: 1.0.0-alpha+001, 1.0.0+20130313144700, 1.0.0-beta+exp.sha.5114f85, 1.0.0+21AF26D3----117B344092BD.

<!-- gh-comment-id:758377990 --> @Nixinova commented on GitHub (Jan 12, 2021): With the rest of the context there is no issue here. The examples are of build metadata itself, not of the precedence. > Build metadata MAY be denoted by appending a plus sign and a series of dot separated identifiers immediately following the patch or pre-release version. [...] Examples: 1.0.0-alpha+001, 1.0.0+20130313144700, 1.0.0-beta+exp.sha.5114f85, 1.0.0+21AF26D3----117B344092BD.
Author
Owner

@alexandrtovmach commented on GitHub (Jun 14, 2021):

@saketGuptaTiger is it helpful?

<!-- gh-comment-id:860355184 --> @alexandrtovmach commented on GitHub (Jun 14, 2021): @saketGuptaTiger is it helpful?
Author
Owner

@dbplunkett commented on GitHub (Jul 24, 2021):

I too was confused about this for a while. As Nixinova pointed out, this is not an issue of correctness. However, it is an issue of clarity. As written and laid out, the examples are more closely associated with the description of precedence than with the description of build metadata as a whole. I.e. it looks like we are being given examples of precedence. Perhaps examples should be put on a new paragraph.

<!-- gh-comment-id:886110205 --> @dbplunkett commented on GitHub (Jul 24, 2021): I too was confused about this for a while. As Nixinova pointed out, this is not an issue of correctness. However, it is an issue of clarity. As written and laid out, the examples are more closely associated with the description of precedence than with the description of build metadata as a whole. I.e. it looks like we are being given examples of precedence. Perhaps examples should be put on a new paragraph.
Author
Owner

@Nixinova commented on GitHub (Jul 24, 2021):

Or just say "Examples of build metadata"

<!-- gh-comment-id:886110794 --> @Nixinova commented on GitHub (Jul 24, 2021): Or just say "Examples <ins>of build metadata</ins>"
Author
Owner

@jwdonahue commented on GitHub (Dec 13, 2021):

Precedence is covered in #11, but it lacks examples that include meta.

I think their should be a paragraph break between the descriptions and their respective examples.

The field descriptions should be limited to syntax, and reference #11 wrt to precedence rules.

<!-- gh-comment-id:992960984 --> @jwdonahue commented on GitHub (Dec 13, 2021): Precedence is covered in #11, but it lacks examples that include meta. I think their should be a paragraph break between the descriptions and their respective examples. The field descriptions should be limited to syntax, and reference #11 wrt to precedence rules.
Author
Owner

@jwdonahue commented on GitHub (Dec 13, 2021):

I also think that explicitly excluding metadata from the sort order was a major lapse in judgement. It was put there to satisfy opposing camps (need meta, don't or won't support it). It should have been optional. Conforming tools MUST allow metadata and SHOULD or MAY provide an option to sort/select versions that match a specific tag.

<!-- gh-comment-id:992969957 --> @jwdonahue commented on GitHub (Dec 13, 2021): I also think that explicitly excluding metadata from the sort order was a major lapse in judgement. It was put there to satisfy opposing camps (need meta, don't or won't support it). It should have been optional. Conforming tools MUST allow metadata and SHOULD or MAY provide an option to sort/select versions that match a specific tag.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/semver#2177