Skip to content

cmd/go: misleading error message #31775

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

Closed
zigo101 opened this issue May 1, 2019 · 3 comments
Closed

cmd/go: misleading error message #31775

zigo101 opened this issue May 1, 2019 · 3 comments
Labels
FrozenDueToAge modules NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.

Comments

@zigo101
Copy link

zigo101 commented May 1, 2019

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

go version devel +ba978f5fff Tue Apr 30 23:31:26 2019 +0000 linux/amd64

What did you do?

module example.com/myapp v2.0.0
go build

What did you expect to see?

go: errors parsing go.mod:
/tmp/foo/go.mod:1: usage: module module/path

What did you see instead?

go: errors parsing go.mod:
/tmp/foo/go.mod:1: usage: module module/path [version]
@katiehockman
Copy link
Contributor

Hi @go101, could you please provide more context here? It would be helpful if you could run go env and give the output, as well as give more context about what exactly you think is misleading/missing about the current error message.

@katiehockman katiehockman added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. modules labels May 1, 2019
@zigo101
Copy link
Author

zigo101 commented May 2, 2019

go env doesn't help for this issue.

What I mean is the error message indicates that a version is allowed to be specified in the module directive, but in fact, it is not allowed.

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/175017 mentions this issue: cmd/go/internal/modfile: make error message for module path more clear

@katiehockman katiehockman added NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels May 3, 2019
@golang golang locked and limited conversation to collaborators May 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge modules NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Projects
None yet
Development

No branches or pull requests

3 participants