You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As we work on getting x/tools tests passing with GODEBUG=gotypesalias=1 in #65294, I noticed that GODEBUG is not included in the test cache key. It probably should be.
[gopls]> go test -count=1 ./doc
ok golang.org/x/tools/gopls/doc 1.912s
[gopls]> GODEBUG=gotypesalias=1 go test ./doc
ok golang.org/x/tools/gopls/doc (cached)
[gopls]> GODEBUG=gotypesalias=1 go test -count=1 ./doc
--- FAIL: TestGenerated (1.71s)
generate_test.go:26: documentation needs updating. Run: cd gopls && go generate
FAIL golang.org/x/tools/gopls/doc 1.774s
Adding GODEBUG to the test cache key seems appropriate — every Go program depends on GODEBUG via the runtime package, and it is likely that the runtime parses that variable in a way that is not visible to the test log.
GODEBUG is probably not being recorded their because it is parsed directly by the runtime package without going through the usual os.Getenv hooks. We should probably add it to the cache key explicitly.