-
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/vet: GO111MODULE=off go test -count=1 cmd/vet
fails
#32107
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@rsc has been doing some refactoring in |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@bradfitz I think maybe because I set Hope anyone haven't run |
This comment has been minimized.
This comment has been minimized.
@bcmills @bradfitz The error occurs again in my local
|
go vet cmd/vet/testdata/unsafeptr
does not produce output when GO111MODULE=off
go vet cmd/vet/testdata/unsafeptr
does not produce output when GO111MODULE=off
go vet cmd/vet/testdata/unsafeptr
does not run when GO111MODULE=off
go vet cmd/vet/testdata/unsafeptr
does not run when GO111MODULE=off
go vet cmd/vet/testdata/unsafeptr
does not report error when GO111MODULE=off
I believe the problem comes from this line https://github.com/golang/tools/blob/9558fe4a7893c491f71cd402ea24d4a9366b8918/go/analysis/internal/analysisflags/flags.go#L56 When |
It's unclear that If this is really about a real package, please give an example that is not testing a testdata directory. |
OK, I see that the real problem is |
go vet cmd/vet/testdata/unsafeptr
does not report error when GO111MODULE=off
GO111MODULE=off go test -count=1 cmd/vet
fails
Separately, it may be that we should special-case GO111MODULE and include it in the test cache key hash. I am seeing |
@rsc I did not look much into it since #32107 (comment), would take another look when I have time. |
Filled #32285 |
The test's dependency on Instead of hard-coding |
This was fixed in 902d5aa |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
No
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
go vet
produces output regardless ofGO111MODULE
value.What did you see instead?
go vet
does not produce output whenGO111MODULE=off
.The text was updated successfully, but these errors were encountered: