-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
staticcheck: Fails with Go 1.24: internal error in importing ... (unsupported version: 2) #1627
Comments
It seems that it was already fixed on master in v0.5.1...master $ go1.24rc2 run honnef.co/go/tools/cmd/staticcheck@master .
main.go:6:2: should merge variable declaration with assignment on next line (S1021)
exit status 1
$ go1.24rc2 run honnef.co/go/tools/cmd/staticcheck@master -debug.version
staticcheck (devel, v0.6.0-0.dev.0.20250112185414-21df14b396f6)
Compiled with Go version: go1.24rc2
Main module:
honnef.co/go/tools@v0.6.0-0.dev.0.20250112185414-21df14b396f6 (sum: h1:V0zVc5mjXZdaUSO26gkYCmjBSju5zKVkHY0O7K4TxLg=)
Dependencies:
github.com/BurntSushi/toml@v1.4.1-0.20240526193622-a339e1f7089c (sum: h1:pxW6RcqyfI9/kWtOwnv/G+AzdKuy2ZrqINhenH4HyNs=)
golang.org/x/exp/typeparams@v0.0.0-20231108232855-2478ac86f678 (sum: h1:1P7xPZEwZMoBoz0Yze5Nx2/4pxj6nw9ZqHWXqP0iRgQ=)
golang.org/x/mod@v0.21.0 (sum: h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0=)
golang.org/x/sync@v0.8.0 (sum: h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=)
golang.org/x/tools@v0.25.0 (sum: h1:oFU9pkj/iJgs+0DT+VMHrx+oBKs/LJMV+Uvg78sl+fE=) So it likely just needs a new release. |
The next release of Staticcheck will coincide with the Go 1.24 release. |
[Edit: none of the following makes sense for the error message. Apologies.]
|
As this works on master but not with the latest release of Staticcheck, I believe this is actually caused by using an old version of |
Yes. This makes more sense. |
FYI, it seems that Go 1.24 release is just around the corner. |
Just released (https://go.dev/doc/go1.24) which lead me here as I got the same error on the latest Staticcheck release. Switched to master for now but I'll watch for the v0.6.0 release. |
Yes, this now broken in 2024.1.1 if you're using Go 1.24. |
Version 2025.1 has just been released. |
While testing Go 1.24 (rc1 and rc2) in
I noticed staticcheck is failing with a simple test from homebrew formula
staticcheck.rb
, reproduced below:Same test with go 1.23 works fine:
The text was updated successfully, but these errors were encountered: