-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: document interaction of go.work with GODEBUG #70083
Comments
Related Issues and Documentation
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.) |
This is confusing, I agree. The documentation should mention that the default GODEBUG settings are determined by the go version in either the go.work or go.mod with go.work taking priority. Here's a code pointer to this behavior: https://cs.opensource.google/go/go/+/master:src/cmd/go/internal/load/godebug.go;l=51;bpv=0;bpt=1 |
I'd like to work on this issue. |
This change updates the documentation to explain how GODEBUG settings are configured based on the Go version specified in either the go.mod or go.work file, with go.work taking priority. This clarification helps developers understand the interaction of GODEBUG settings with different Go workspace configurations. Fixes golang/go#70083
Change https://go.dev/cl/623416 mentions this issue: |
We recently encountered this confusing scenario when working in the x/tools repository
Therefore, there's no way to have a go.work file for which both x/tools and x/tools/gopls tests pass. This is a problem in x/tools, because these tests also fail when run from a different main module that uses go1.23 (see #70082).
Nevertheless, go.dev/blog/compat says the following:
We should update that documentation to explain how godebug interacts with go.work files.
CC @timothy-king @matloob @samthanawalla
The text was updated successfully, but these errors were encountered: