Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/go: module commands fail to resolve version tags that include metadata #26605
Semver metadata are considered valid by the semver spec, however Go modules do not work when you try to
Go version: tip
According to semver.org, “Build metadata SHOULD be ignored when determining version precedence. Thus two versions that differ only in the build metadata, have the same precedence.”
If we were to allow
That seems to imply that we should resolve the
This is working as intended. There needs to be a single canonical tag we look for, and that tag is the tag with metadata stripped. Semver says that v1.2.3-alpha and v1.2.3-alpha+metadata should mean the same thing, so we look for v1.2.3-alpha.
Note that our mapping of git tags to go versions is not anticipated by nor controlled by the semver spec, of course.