-
Notifications
You must be signed in to change notification settings - Fork 17.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/go: go mod -sync fails although go get succeeds #26601
Comments
Another potentially interesting aspect of the above log is that |
Possibly the same underlying cause as #26602. |
"go get" downloads and builds the packages you named, just as it always has. "go mod -sync" makes sure that everything in the main (current) module and its dependencies is buildable. Note that typically you shouldn't need "go get" - just add the import and run "go build". You did not remark on the fact that x.go imports a path from github.com instead of gopkg.in. Was that intentional? It's possible that "go get" should do more, but I am not sure how much flexibility we really have here. |
Yes, you're right - I had intended to write "gopkg.in", and that explains this behaviour. I'll close this issue as invalid. Sorry for the noise. |
go version devel +5f5402b Tue Jul 24 23:54:08 2018 +0000 linux/amd64
git version 2.18.0
What did you do?
I created a module, did a
go get
at a particular version, then updated it with anothergo get
, and then rango mod -sync
to try to remove the spurious dependencies. It failed unexpectedly. I then ran the command again with some log statements added in the Import function in src/cmd/go/internal/modload/import.go.Given that the
go get
command worked fine, I'd expectgo mod -sync
to work OK too.The text was updated successfully, but these errors were encountered: