-
Notifications
You must be signed in to change notification settings - Fork 18k
x/tools/gopls: warn if language version is newer than compile version #68258
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
Comments
Note that Staticcheck primarily has its own logic for this to produce better error messages. go/types already complains when the asked-for language version is newer than the version of go/types, but in Go 1.22, the error message read 8121604 seems to be the commit that improved the message. |
Will a diagnostic in In the case of #68248, I built with go1.23rc1 on the command line with In @dominikh's example above, maybe the error would appear for every file, which would cover it, I think. |
This is much less of a problem now that gopls requires the latest Go version. Bumping to the next release. |
As suggested by @matta in #68248, we should warn when the version of Go used to compile gopls is older than the language version implied by the go.mod file. A diagnostic on the go directive of the go.mod file probably suffices.
Originally posted by @matta in #68248 (comment)
The text was updated successfully, but these errors were encountered: