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
"overlays will not appear when binaries and tests are run through go run and go test respectively."
I think this meant to say that when the test binary runs (not when the test is built), the overlaid file is not present. I.e. if the test binary itself wants to read foo_test.go during the test execution, it sees the original file, not the overlaid file.
I think this works as intended. @matloob can correct me if I'm mistaken.
Go version
1.22.1
Output of
go env
in your module/workspace:What did you do?
N/A
What did you see happen?
N/A
What did you expect to see?
46fa8af introduced support for the
-overlay
flag togo test
as of Go 1.17 (see #44946).However, the docs still state that "overlays will not appear when binaries and tests are run through go run and go test respectively.":
go/src/cmd/go/internal/work/build.go
Lines 163 to 173 in d5138e5
I believe that's specifically what 46fa8af changed with respect to
go test
(I'm not sure aboutgo run
).The text was updated successfully, but these errors were encountered: