-
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: "go test" seems to cache test build output when GODEBUG changes #51561
Comments
Slight correction: I don't think it's the test cache, because |
Curious if the fix would just be to add GODEBUG to the list in
|
@bcmills, @ianlancetaylor , y'all are the nominal owners. |
To my recollection, So it seems to me that |
(If the purpose of |
This case is confusing, because I think I agree with @dr2chase that we should make |
That probably explains why my cached run had fewer output lines: that included the cached output from toolchain programs like the compiler, but not the top-level cmd/go process. Note that I used |
FWIW, seems like this isn't isolated to tests. As per
I would expect |
Thanks Bryan! I did see that one but skipped reading through it since it seemed to be related to the usage of |
I was using
GODEBUG=inittrace=1
to get some quick stats on the init cost of some packages viago test
, and I noticed that even after I unset the variable, its output was still around - presumably via Go's cache.As a repro:
It's unclear why the number of lines diminishes, but they're all still inittrace output.
go build
does not show this bug, so presumably the bug is with the test cache:Perhaps Go's cache should be taught to include
GODEBUG
as part of cache key hashes.The text was updated successfully, but these errors were encountered: