-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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 vet does not support -overlay #44957
Comments
Hi, alldocs.go says this: |
Also:
|
Workaround limitation of embed regarding support of -overlay: - add the overlay of the embeded file in the package tree (this is a limitation of embed patterns): cmd/main/.overlay-greeting - inject a .go file via the overlay that overrides the content of the original embeded file with the embeded replacement file at runtime (both embedded files are in the final binary). Unfortunately "go vet" doesn't work with overlays, so "make test" fails. golang/go#44957
We should implement this for Go 1.24. |
Change https://go.dev/cl/629199 mentions this issue: |
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: