I ran cd foo && go test -overlay=overlay.json . and expected the tests to pass.
What did you expect to see?
$ go test -overlay=overlay.json .
ok test.pkg/foo 0.123s
What did you see instead?
$ go test -overlay=overlay.json .
# test.pkg/foo
vet: open bar.go: no such file or directory
FAIL test.pkg/foo [build failed]
FAIL
exit status 2
The issue is because the overlay is added to GoTestFiles but go vet does not support (or receive information about) overlays, so it tries to read the overlaid file directly from the filesystem where it does not exist.
The text was updated successfully, but these errors were encountered:
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Consider the following txtar:
I ran
cd foo && go test -overlay=overlay.json .
and expected the tests to pass.What did you expect to see?
What did you see instead?
The issue is because the overlay is added to
GoTestFiles
butgo vet
does not support (or receive information about) overlays, so it tries to read the overlaid file directly from the filesystem where it does not exist.The text was updated successfully, but these errors were encountered: