-
Notifications
You must be signed in to change notification settings - Fork 158
Closed
Labels
v2Related to the 2.x version used by depRelated to the 2.x version used by dep
Description
In golang/dep, we are using semver.NewConstraintIC
to parse raw strings as constraints and some of them aren't being handled as expected:
v1.12.0-g2fd980e
properly returns(semver.rangeConstraint) ^1.12.0-g2fd980e
v0.12.0-12-g2fd980e
returns(semver.rangeConstraint) >=0.12.0, <=12.0.0-g2fd980e
, when I expected^1.12.0-g2fd980e
v1.12.0-2-g2fd980e
returns(semver.rangeConstraint) >=1.12.0, <=2.0.0-g2fd980e
, when I expected^v1.12.0-2-g2fd980e
.v1.3.1-1-gf12c623
returns an unexpected(semver.none)
. I expected^1.3.1-1-gf12c623
, or at the very least an error.
Essentially the dash in the prerelease tag is causing the function parse the input a range between v1.3.1 to 1-gf12c623
.
I'm going to try having it first check if the input string is a valid version first, and if that pans out, submit a PR.
sdboyer, joeshaw, darkowlzz, mh-cbon and AlekSi
Metadata
Metadata
Assignees
Labels
v2Related to the 2.x version used by depRelated to the 2.x version used by dep