-
Notifications
You must be signed in to change notification settings - Fork 17.5k
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: GO111MODULE does not invalidate test cache #69203
Comments
CC @matloob, @samthanawalla. |
I wonder why we don't seem to be adding the default GODEBUG to the action id for the link step? I think we could just add it to printLinkerConfig here: https://cs.opensource.google/go/go/+/master:src/cmd/go/internal/work/exec.go;drc=6b2ffc72b67713de4f08915937a64392aa4dbff0;l=347 |
So we don't currently add it because it's usually a part of the buildinfo, which is used as part of the action id: https://cs.opensource.google/go/go/+/master:src/cmd/go/internal/work/exec.go;l=327;drc=6b2ffc72b67713de4f08915937a64392aa4dbff0 . But the buildinfo isn't generated for tests unless the test is a test of package main. I think we should probably still explicitly add default GODEBUG to the link action id. One alternative would be to add build info for all tests, but we'd be doing unnecessary work to get the build info. |
Change https://go.dev/cl/610875 mentions this issue: |
Go version
go version go1.22.6 darwin/amd64
Output of
go env
in your module/workspace:What did you do?
What did you see happen?
As seen above, changing
GO111MODULE
did not invalidate the test cache, even though it factors into the compiler's behavior around the defaultGODEBUG
selection and thus by extension the behavior of the code being tested.What did you expect to see?
Changing
GO111MODULE
should invalidate the test cache, given that it changes the defaultGODEBUG
. (Or at least, the defaultGODEBUG
itself ought to factor into the cache.)The text was updated successfully, but these errors were encountered: