-
-
Notifications
You must be signed in to change notification settings - Fork 360
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
latest release binaries panic with Go 1.22.0 #1496
Comments
I am seeing a similar, but not exactly identical, nilref panic even when using
Repo this happens in is unfortunately proprietary. |
I've got the same: fastly/cli#1130 |
golang/tools#992d98451cb0cd4370c14e54e4262be89e83bfe2 golang/go#56010 dominikh#1495 dominikh#1496
Similar issue, same After running |
I haven't yet been able to reproduce the nil pointer dereference when running Staticcheck built with Go 1.22. |
Update: little egg on my face here, we had a version inconsistency with our Github workflow Leaving my original post for visibility We're able to reproduce this in a proprietary repository, but only running in a Github Action running
Panic is identical to what @tomasaschan posted. |
I was able to fix my setup by reinstalling go 1.22, after uninstalling go 1.21 (even though the go version reported in my terminal was already 1.22). My conclusion is that, despite what my terminal reported, the tools were installed using Go 1.21, and when reinstalled with 1.22 it worked. |
+1 panic |
I was facing a similar issue with a Homebrew installed version of staticcheck and Go 1.22.0. Even after reinstalling (
ResolutionRe-installing with
|
Upstream's latest version works fine when built with Go 1.22, but their release archives are built with 1.21, and that seems to trigger a panic due to issue dominikh/go-tools#1496. Thankfully, building from source is easy enough. It shouldn't cause any noticeable slowdown, since we reuse both the modules and build Go caches via actions/setup-go.
Upstream's latest version works fine when built with Go 1.22, but their release archives are built with 1.21, and that seems to trigger a panic due to issue dominikh/go-tools#1496. Thankfully, building from source is easy enough. It shouldn't cause any noticeable slowdown, since we reuse both the modules and build Go caches via actions/setup-go.
I'm seeing the same issue. |
New release is out. |
Tested on both Apple Silicon and Linux amd64 > go version
go version go1.22.0 darwin/arm64
> go install honnef.co/go/tools/cmd/staticcheck@v0.4.7
> staticcheck -debug.version
staticcheck 2023.1.7 (v0.4.7)
Compiled with Go version: go1.21.7
Main module:
honnef.co/go/tools@v0.4.7 (sum: h1:9MDAWxMoSnB6QoSqiVr7P5mtkT9pOc1kSxchzPCnqJs=)
Dependencies:
github.com/BurntSushi/toml@v1.2.1 (sum: h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=)
golang.org/x/exp/typeparams@v0.0.0-20221208152030-732eee02a75a (sum: h1:Jw5wfR+h9mnIYH+OtGT2im5wV1YGGDora5vTv/aa5bE=)
golang.org/x/mod@v0.12.0 (sum: h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=)
golang.org/x/sys@v0.11.0 (sum: h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=)
golang.org/x/tools@v0.12.1-0.20230825192346-2191a27a6dc5 (sum: h1:Vk4mysSz+GqQK2eqgWbo4zEO89wkeAjJiFIr9bpqa8k=)
> go install honnef.co/go/tools/cmd/staticcheck@master
> staticcheck -debug.version
staticcheck (devel, v0.5.0-0.dev.0.20240222130255-69fbc046a2b0)
Compiled with Go version: go1.22.0
Main module:
honnef.co/go/tools@v0.5.0-0.dev.0.20240222130255-69fbc046a2b0 (sum: h1:zATFNFAnrNPHCuwz2b0+axa9pbvnJkezr7Mb3DMkXmM=)
Dependencies:
github.com/BurntSushi/toml@v1.3.2 (sum: h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8=)
golang.org/x/exp/typeparams@v0.0.0-20231108232855-2478ac86f678 (sum: h1:1P7xPZEwZMoBoz0Yze5Nx2/4pxj6nw9ZqHWXqP0iRgQ=)
golang.org/x/mod@v0.14.0 (sum: h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0=)
golang.org/x/sys@v0.14.0 (sum: h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q=)
golang.org/x/tools@v0.15.0 (sum: h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8=) What are we doing wrong? (Should I create a new issue for this?) |
I have absolutely no idea how that would be possible. |
Same here on Apple M1, with 1.22.0 and v0.4.7
I deleted go and now it works, no idea what changed ... but thanks to tomasaschan |
The
./...
above is on https://github.com/vocdoni/vocdoni-node, but I suspect many other packages run into this too.Note that the panic goes away if I build master with Go 1.22.0 and try again, which perhaps isn't surprising given that the latest release binaries were built with Go 1.21.1. Perhaps a new release is due, with new binaries?
The text was updated successfully, but these errors were encountered: