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

Open
leitzler opened this issue Dec 6, 2018 · 3 comments
Open

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

leitzler opened this issue Dec 6, 2018 · 3 comments
Labels
GoCommand cmd/go modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@leitzler
Copy link
Contributor

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?

Yes

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

go env Output
$ go env
N/A

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.

E.g.:
go: github.com/sirupsen/logrus@v1.2.0 requires github.com/stretchr/testify@v1.2.2, 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

@myitcv
Copy link
Member

myitcv commented Dec 6, 2018

cc @bcmills

@bcmills bcmills added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Dec 6, 2018
@bcmills bcmills added this to the Go1.13 milestone Dec 6, 2018
@bcmills
Copy link
Contributor

bcmills commented Dec 6, 2018

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

@leitzler
Copy link
Contributor Author

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
Labels
GoCommand cmd/go modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

5 participants