We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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?
to your account
go list -json
$ go version
go version go1.20.5 darwin/amd64
$ go env
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/pl/aaa/T/go-build111=/tmp/go-build -gno-record-gcc-switches -fno-common"
go list -json .
Expect field .TestEmbedFiles presented.
Field .TestEmbedFiles is missing.
The text was updated successfully, but these errors were encountered:
Hmm. We don't normally need to resolve embed patterns for test sources unless we are actually building the test (which would correspond to the -test flag in go list).
Probably we should do the extra work to resolve them in go list when the fields may be needed (compare #29666).
Sorry, something went wrong.
Sorry, I didn't realize the field will only presented when the -test flag is given.
Discussed with @rsc. Our thinking is:
Errors in resolving TestEmbedFiles shouldn't cause go list to fail for the non-test package.
On the other hand, the -test flag probably shouldn't be needed to populate the fields. (-json, or -f with a template that refers to TestEmbedFiles, should probably suffice.)
But on further consideration, those two points seem to be at odds with each other. 🤔
No branches or pull requests