Skip to content

Allow pre-release versions in the registry #164

@pablochacin

Description

@pablochacin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions