-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: go list -m reports command-line-arguments when called outside a module #36793
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
Comments
Per https://tip.golang.org/cmd/go/#hdr-Package_lists_and_patterns:
Running a small The effective package path for a list of I think @jayconrod recently suggested that we consider also making (CC @matloob) |
Sorry, I forgot to report that there are no files in the current working directory. In my case, there is no
But there is no package, in my case. |
https://github.com/golang/go/blob/master/doc/modules.md#resolving-a-package-to-a-module says that:
And
|
Change https://go.dev/cl/661115 mentions this issue: |
Ah this seems to be the same issue as #30136 |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
In a directory with no reachable
go.mod
:What did you expect to see?
go list
should report an error, since there is no module.What did you see instead?
This really feels wrong for me.
The text was updated successfully, but these errors were encountered: