Masterminds / Masterminds/semver
Exact match on build metadata
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 1.4k
- Forks
- 168
- PR merge metrics
- No merged PRs in 30d
Description
Currently, the "build metadata" part of the version is ignored by all constraints. This make it impossible, in tools like Helm, to specifiy an exact dependency to a single build, and leads to unpredictable behaviour or hackish workarounds.
It has already been said in #172 and #164 that, per spec:
Build metadata MUST be ignored when determining version precedence.
I think this statement ignores the very first sentence of SemVer chapter 11 (emphasis is mine):
Precedence refers to how versions are compared to each other when ordered.
When using an exact match constraint (e.g. =1.0.0-develop+cafebabe or !=), no ordering nor precedence resolution is expected. I want this exact version, and expect an error if it does not exist. If, and only if, I use an inequality or range operator, should precedence rules come into play, as several versions may match the query.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how exact-match and inequality constraints compare versions in the Go semver package. Add focused coverage for exact and not-equal constraints containing build metadata, and verify that range and inequality behavior continues to follow precedence rules.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100