-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: list -json
prints finding module for package
even in vendor and readonly mode
#58417
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
That message is logged to |
The change in the I see that you've filed #58418 for the other field differences, so I will comment on those there. |
I see this as a minor UX issue (a chatty We should fix the UX issue, but I don't think this is substantial enough to be particularly urgent or to merit a backport. |
list -json
prints finding module for package
even in vendor and readonly mode
Thanks for the input, and apologies for not checking the output stream -- I agree with your assessment that this makes it squarely a UI issue and is easy to deal with on the consuming end by just consuming |
Change https://go.dev/cl/467516 mentions this issue: |
Change https://go.dev/cl/467517 mentions this issue: |
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?
Run the following to create a module that vendors its dependencies and then run
go list -e -json
:What did you expect to see?
Output of
go list -e -json
should just be JSONWhat did you see instead?
Note the presence of the initial line "go: finding module for package golang.org/x/tools", which is not JSON. This causes other tooling that consumes this output and expects only JSON to fail.
Further information
This is a behavior change between Go 1.19 and Go 1.20. Here is the output using Go 1.19:
This behavior only occurs when the module dependencies are vendored:
The text was updated successfully, but these errors were encountered: