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: improve error message from '-mod=readonly' #29118

leitzler opened this issue Dec 6, 2018 · 3 comments

cmd/go: improve error message from '-mod=readonly' #29118

leitzler opened this issue Dec 6, 2018 · 3 comments


Copy link

@leitzler leitzler commented Dec 6, 2018

What version of Go are you using (go version)?

$ go version
go version go1.11.2 linux/amd64

Does this issue reproduce with the latest release?


What operating system and processor architecture are you using (go env)?

go env Output
$ go env

What did you do?

Run go build -mod=readonly when an update of go.mod is needed.

What did you expect to see?

A more descriptive error message. Since -mod=readonly is typically supposed to be used in CI, it will save a lot of manual work if the error message did actually tell why an update to go.mod is needed.

go: requires, but go.mod require @v1.2.1 and updates is disabled by -mod=readonly

What did you see instead?

go: updates to go.mod needed, disabled by -mod=readonly

Copy link

@myitcv myitcv commented Dec 6, 2018

@bcmills bcmills added this to the Go1.13 milestone Dec 6, 2018
Copy link

@bcmills bcmills commented Dec 6, 2018

Would #27005 address your use-case? Presumably that command would list all of the updates needed on failure.

Copy link
Contributor Author

@leitzler leitzler commented Dec 7, 2018

As a workaround, probably.

But since the tool already knows what updates are needed, there is no reason to do it in two steps afaik.
That would require the user to have knowledge of how modules works and what command to run to get the detailed output.

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

Successfully merging a pull request may close this issue.

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