You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Makefile build recipe for oldstable image fails to build with pkg/mod/honnef.co/go/tools@v0.3.0/go/ir/builder.go:36:2: //go:build comment without // +build comment#588
Closed
atc0005 opened this issue
Mar 30, 2022
· 2 comments
· Fixed by #589
Beginning with Go 1.17, the simplest way of installing Staticcheck is by running go install honnef.co/go/tools/cmd/staticcheck@latest. This will install the latest version of Staticcheck to $GOPATH/bin. To find out where $GOPATH is, run go env GOPATH. Instead of @latest, you can also use a specific version, such as @2020.2.1
While the installation process seems to have worked fine with Go 1.16, it evidently no longer does. I guess we'll need to install the precompiled binary from the GitHub releases section instead.
go/ir/builder.go:36:2: //go:build comment without // +build comment (compile)
That's from Go itself, and irrelevant, since only versions up to 1.16 will complain about that, and we only support the last two versions, currently 1.17 and 1.18.
This suggests that even if we use the precompiled binary for the Go 1.16 based oldstable image we're likely to encounter issues. Probably best to roll back to v0.2.2 for now.
v0.3.0 is incompatible with Go 1.16, so we will need to freeze
the staticheck release at v0.2.2 for now. Once we update the
oldstable image to Go 1.17 we can then use the latest
staticcheck version again.
refs GH-588
Emit intent to install a speciifc tool and version prior to
doing so. This can help identify an installation failure
when future incompatibilities arise.
refs GH-588
The text was updated successfully, but these errors were encountered: