-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
x/tools/go/analysis: add Config.GoVersion field #61176
Comments
Change https://go.dev/cl/507976 mentions this issue: |
Change https://go.dev/cl/507880 mentions this issue: |
Based on the discussion above, this proposal seems like a likely accept. |
When invoking a vet tool with -vettool (or vet itself), we need to pass the package's GoVersion to use when analyzing the package. The test of this behavior is in the x/tools/go/analysis CL 507880. For #61176. Change-Id: I3b5a90fcd19a0adc7fb29366e106e18f722fc061 Reviewed-on: https://go-review.googlesource.com/c/go/+/507976 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> Run-TryBot: Russ Cox <rsc@golang.org>
No change in consensus, so accepted. 🎉 |
When invoking a vet tool with -vettool (or vet itself), we need to pass the package's GoVersion to use when analyzing the package. The test of this behavior is in the x/tools/go/analysis CL 507880. For golang#61176. Change-Id: I3b5a90fcd19a0adc7fb29366e106e18f722fc061 Reviewed-on: https://go-review.googlesource.com/c/go/+/507976 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> Run-TryBot: Russ Cox <rsc@golang.org>
To fix #61174 and set up for future changes in Go 1.22, the go command needs to pass the Go version in the compiler config. This requires adding a new GoVersion string field to the Config struct and then passing it through to the types.Config for the package. The full diff is:
The text was updated successfully, but these errors were encountered: