Skip to content

chore: add semver spec for build metadata - #127

Open
daveleek wants to merge 11 commits into
mainfrom
chore/semver-metadata-spec
Open

chore: add semver spec for build metadata#127
daveleek wants to merge 11 commits into
mainfrom
chore/semver-metadata-spec

Conversation

@daveleek

Copy link
Copy Markdown

Adds a series of checks to ensure semver compatibility with regards to version build metadata.
for instance 1.2.2+metadata SEMVER_EQ 1.2.2
!1.2.2+metadata > 1.2.2
etc

The checks are not exhaustive, but from experience our SDKs should either fail all but one (+metadata == +metadata) of these or pass every single one.

@github-project-automation github-project-automation Bot moved this from New to Approved PRs in Issues and PRs Aug 13, 2026

@gastonfournier gastonfournier left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks nice, I left some suggestions to improve names and I'd like to also get @sighphyre POV

"expectedResult": true
},
{
"description": "F8.semverEQ should be enabled for metadata",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"description": "F8.semverEQ should be enabled for metadata",
"description": "F8.semverEQ should ignore metadata and compare only semver",

I understand SemVer 2.0.0 defines precedence (you should ignore metadata for precedence comparison), but it doesn't say anything about equality.

This gives us:

  • version identity/string equality: 1.2.2+foo != 1.2.2
  • SemVer precedence comparison (ignoring metadata): compare(1.2.2+foo, 1.2.2) == 0

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. We do only want the SemVer precedence comparison then is my understanding here? @sighphyre

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gastonfournier with "compare(1.2.2+foo, 1.2.2) == 0" are you suggesting that we do not take metadata into consideration when establishing equality?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is horribly debatable but I agree with Gaston here: 1.1.1+foo == 1.1.1

For no other reason than if you force an exact match here then you can get into a weird place where two semantic versions do not satisfy any of A >= B, A > B, A == B, A < B or A <=B... which... is weird

No idea how SDKs are going to handle this, so should be funnn to roll this out

Comment thread specifications/14-constraint-semver-operators.json Outdated
Comment thread specifications/14-constraint-semver-operators.json Outdated
Comment thread specifications/14-constraint-semver-operators.json Outdated
Comment thread specifications/14-constraint-semver-operators.json Outdated
Comment thread specifications/14-constraint-semver-operators.json Outdated
Comment thread specifications/14-constraint-semver-operators.json Outdated
Comment thread specifications/14-constraint-semver-operators.json Outdated
Comment thread specifications/14-constraint-semver-operators.json Outdated
Comment thread specifications/14-constraint-semver-operators.json Outdated
daveleek and others added 10 commits August 13, 2026 15:58
Co-authored-by: Gastón Fournier <gaston@getunleash.io>
Co-authored-by: Gastón Fournier <gaston@getunleash.io>
Co-authored-by: Gastón Fournier <gaston@getunleash.io>
Co-authored-by: Gastón Fournier <gaston@getunleash.io>
Co-authored-by: Gastón Fournier <gaston@getunleash.io>
Co-authored-by: Gastón Fournier <gaston@getunleash.io>
Co-authored-by: Gastón Fournier <gaston@getunleash.io>
Co-authored-by: Gastón Fournier <gaston@getunleash.io>
Co-authored-by: Gastón Fournier <gaston@getunleash.io>
Co-authored-by: Gastón Fournier <gaston@getunleash.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Approved PRs

Development

Successfully merging this pull request may close these issues.

5 participants