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
$ git clone https://github.com/stellar/go
$ cd go
$ go run honnef.co/go/tools/cmd/[email protected] ./...
-: cannot import "container/list" (unknown iexport format version 2), export data is newer version - update tool (compile)
-: cannot import "github.com/onsi/gomega/matchers/support/goraph/node" (unknown iexport format version 2), export data is newer version - update tool (compile)
-: cannot import "github.com/onsi/gomega/types" (unknown iexport format version 2), export data is newer version - update tool (compile)
-: cannot import "internal/cpu" (unknown iexport format version 2), export data is newer version - update tool (compile)
-: cannot import "internal/goarch" (unknown iexport format version 2), export data is newer version - update tool (compile)
-: cannot import "math/bits" (unknown iexport format version 2), export data is newer version - update tool (compile)
exit status 1
$ go run honnef.co/go/tools/cmd/staticcheck@master ./...
go: downloading honnef.co/go/tools v0.3.0-0.dev.0.20211201164145-eac08b4651cf
go: downloading golang.org/x/tools v0.1.8-0.20211111032514-c116b727ec7e
-: cannot import "container/list" (predeclared type missing from cache: 31), export data is newer version - update tool (compile)
-: cannot import "internal/abi" (predeclared type missing from cache: 31), export data is newer version - update tool (compile)
exit status 1
Discussion
Running staticcheck with Go 1.18beta1 appears to raise some errors about export data being a newer version. This isn't surprising as 1.18 is only in beta and I assume export data within staticcheck needs updating.
You can use the master branch of Staticcheck and it might work to some extent; but Staticcheck doesn't support generics yet, so the moment it encounters those (even if they're in the standard library), it will fail.
This is pretty much expected behavior. Staticcheck supports the last two released versions of Go. We don't support Go 1.18 yet, and won't for a couple more months. We'll support it in time for the full release of 1.18.
For anyone who is also experiencing this, the master branch won't suffice as noted in the above message the stdlib is using generics and causes the errors noted in the PR description above in the second example that uses master.
Environment
Command Run
Discussion
Running staticcheck with Go 1.18beta1 appears to raise some errors about export data being a newer version. This isn't surprising as 1.18 is only in beta and I assume export data within staticcheck needs updating.
The examples above are being run on the public repo https://github.com/stellar/go, and can be reproduced using the steps above.
Related stellar/go#4143
The text was updated successfully, but these errors were encountered: