-
Couldn't load subscription status.
- Fork 0
Description
Users expect pre-releases to be available for testing purposes. However, these versions are filtered out from the registry.
This issue comes from the implementation of the filtering of versions.
When filtering versions using constraints, each version (tag) obtained from github is checked against these constraints. The semver check function explicitly checks for pre-release versions:
// If there is a pre-release on the version but the constraint isn't looking
// for them assume that pre-releases are not compatible. See issue 21 for
// more details.
if v.Prerelease() != "" && c.con.Prerelease() == "" {
return false, fmt.Errorf("%s is a prerelease version and the constraint is only looking for release versions", v)
}
According to the issue mentioned in the comment, this is by design:
Section 9 of SemVer 2 makes it pretty clear that pre-releases are not considered compatible with anything else.
A pre-release version indicates that the version is unstable and might not satisfy the intended compatibility requirements as denoted by its associated normal version.