Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Cannot install on go 1.11.2 #2055

Closed
andig opened this issue Nov 23, 2018 · 9 comments
Closed

Cannot install on go 1.11.2 #2055

andig opened this issue Nov 23, 2018 · 9 comments

Comments

@andig
Copy link

andig commented Nov 23, 2018

What dep command did you run?

~/gosdm630 $ go get -u github.com/golang/dep/cmd/dep
go: finding github.com/golang/dep/cmd/dep latest
go: finding github.com/golang/dep/cmd latest
# github.com/golang/dep/gps
../go/pkg/mod/github.com/golang/[email protected]/gps/constraint.go:149:4: undefined: semver.Constraint
@Syspretor
Copy link

I met the same error, have you found a solution of it ?

@andig
Copy link
Author

andig commented Dec 6, 2018

No :(

@kevinburke
Copy link
Collaborator

I think this has something to do with the new Go modules code? You can see semver.Constraint exists in github.com/golang/dep/vendor/github.com/Masterminds/semver/constraints.go so something must be happening for that file to not load correctly.

Can you try turning off Go modules support and seeing if this works?

@kevinburke
Copy link
Collaborator

FWIW, I can't reproduce this on either tip or Go 1.11.2.

@andig
Copy link
Author

andig commented Jan 5, 2019

Closing thin one as I've happily moved everything to modules. Thank you for the great support received here!

@andig andig closed this as completed Jan 5, 2019
@pocari
Copy link

pocari commented Jan 23, 2019

I met the same error.
but, I succeeded when GO111MODULE=on was changed to GO111MODULE=off.

@rski
Copy link

rski commented Mar 19, 2019

Here's some digging from my encounter with this.
With modules on, go get picks up the latest tag for semver:

go: extracting github.com/Masterminds/vcs v1.13.0
go: finding github.com/golang/protobuf/proto latest
go: extracting github.com/Masterminds/semver v1.4.2

However, the vendored Masterminds is from branch 2.x. In the tagged v1.4.2, Constraint is private, in 2.x it's not. I'm not 100% sure how to fix this in my case, but leaving this here to potentially satisfy someone else's curiosity.

@bobzoller
Copy link

I fixed this by forcing semver to a particular (2.x) git commit:

go get github.com/Masterminds/semver@059deebd1619

@tendolukwago
Copy link

Here's some digging from my encounter with this.
With modules on, go get picks up the latest tag for semver:

go: extracting github.com/Masterminds/vcs v1.13.0
go: finding github.com/golang/protobuf/proto latest
go: extracting github.com/Masterminds/semver v1.4.2

However, the vendored Masterminds is from branch 2.x. In the tagged v1.4.2, Constraint is private, in 2.x it's not. I'm not 100% sure how to fix this in my case, but leaving this here to potentially satisfy someone else's curiosity.

Thank you for satisfying my curiosity lol

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants