Skip to content
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: "updates to go.sum needed" error message should suggest running 'go get' and/or 'go mod tidy' #41934

Open
bcmills opened this issue Oct 12, 2020 · 1 comment

Comments

@bcmills
Copy link
Member

@bcmills bcmills commented Oct 12, 2020

This is another variation on #41576. The error message that we emit due to an (implicit or explicit) -mod=readonly when the go.sum file is incomplete should suggest some action that the user can take to resolve the error: namely, running go mod tidy or go get -d.

example.com$ go version
go version devel +9449a125e Sun Oct 11 17:54:59 2020 +0000 linux/amd64

example.com$ go mod init example.com
go: creating new go.mod: module example.com

example.com$ go get -d golang.org/x/mod
go: downloading golang.org/x/mod v0.3.0
go: golang.org/x/mod upgrade => v0.3.0

example.com$ go list golang.org/x/tools/cmd/stringer
go: downloading golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e
go: updates to go.sum needed, disabled by -mod=readonly

Marking as release-blocker for Go 1.16 because this will come up a lot more often with the -mod flag defaulting to readonly (#40728).

CC @jayconrod @matloob

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.