dominikh / go-tools

Staticcheck - The advanced Go linter
https://staticcheck.dev
MIT License
6.17k stars 377 forks source link

Staticcheck broken on 1.9 #132

Closed bufdev closed 7 years ago

bufdev commented 7 years ago

Filing this to get ahead of the curve.

$ go version
go version go1.9beta1 darwin/amd64

This is what happens when I run staticcheck:

panic: Package("runtime/cgo").Build(): unsatisfied import: Program.CreatePackage("unsafe") was not called

goroutine 866 [running]:
honnef.co/go/tools/ssa.(*Package).build(0xc425b7b4a0)
/tmp/src/honnef.co/go/tools/ssa/builder.go:2300 +0x15bb
honnef.co/go/tools/ssa.(*Package).(honnef.co/go/tools/ssa.build)-fm()
/tmp/src/honnef.co/go/tools/ssa/builder.go:2260 +0x2a
sync.(*Once).Do(0xc425b7b4cc, 0xc42b464798)
    /usr/local/Cellar/go/1.9beta1/libexec/src/sync/once.go:44 +0xbe
honnef.co/go/tools/ssa.(*Package).Build(0xc425b7b4a0)
/tmp/src/honnef.co/go/tools/ssa/builder.go:2260 +0x4c
honnef.co/go/tools/ssa.(*Program).Build.func1(0xc42788b4b0, 0xc425b7b4a0)
/tmp/src/honnef.co/go/tools/ssa/builder.go:2244 +0x2b
created by honnef.co/go/tools/ssa.(*Program).Build
/tmp/src/honnef.co/go/tools/ssa/builder.go:2243 +0x11a
dominikh commented 7 years ago

What revision of staticcheck are you running?

bufdev commented 7 years ago

f583b587b6ff1149f9a9b0c16ebdda74da44e1a2 apparently, which I think is the latest commit https://github.com/yarpc/yarpc-go/blob/dev/glide.lock#L278

bufdev commented 7 years ago

Hmm, when I upgrade to 1.9beta2, this no longer happens. Feel free to close this if it's not an issue for you.

dominikh commented 7 years ago

Seeing how this is a duplicate of #76 it probably was unrelated to the upgrade of Go :)