-
-
Notifications
You must be signed in to change notification settings - Fork 377
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
Issues with rangefunc in 1.23rc1 projects #1569
Comments
Note that when you do I don't yet know why this panics, and it shouldn't, but it works fine when you build Staticcheck with Go 1.23. |
The crash was the symptom of a missing error check, fixed in 5950450. f4ee291 improves Staticcheck to print a more useful error message when the version of Go Staticcheck was built with is older than the version required by the module under analysis. That
That this makes the combination of |
Ahh, I did not realize that these tools needed to be built with a version of go at least as recent as the go module they are analyzing. Makes sense, given that they are probably using huge portions of the compiler infrastructure.
Nice idea. |
Basic issue
The second issue is a problem because currently gopls v0.16 says it supports rangefunc, but appears to require GOEXPERIMENT=rangefunc in 1.23rc1 projects before it stops reporting errors for them. See golang/go#68248
Steps and more information:
Create a project with go.mod
and main.go:
Then install statichceck HEAD:
Then see two different kinds of failures. The first is with an empty GOEXPERIMENT.
Notice with the above: it is complaining about iter.go in the standard library, not the use of rangefunc in main.go.
Additional info
The text was updated successfully, but these errors were encountered: