Go 1.20rc1 support?
#3413
-
I'm seeing the following behavior when running golangci-lint within the Go 1.20rc1 Docker image: # golangci-lint run
ERRO [runner] Panic: buildir: package "netip" (isInitialPkg: false, needAnalyzeSource: true): in net/netip.AddrFromSlice: cannot convert Load <[]byte> t0 ([]byte) to [4]byte: goroutine 1083 [running]:
runtime/debug.Stack()
/usr/local/go/src/runtime/debug/stack.go:24 +0x65
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func1()
/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/runner_action.go:102 +0x155
panic({0x1509960, 0xc0003dce10})
/usr/local/go/src/runtime/panic.go:884 +0x213
honnef.co/go/tools/go/ir.emitConv(0xc0000a5400, {0x19475a8, 0xc000e6de00}, {0x193aa78?, 0xc0019f5230}, {0x193a168, 0xc0018ce280})
/go/pkg/mod/honnef.co/go/[email protected]/go/ir/emit.go:293 +0xd29
honnef.co/go/tools/go/ir.(*builder).expr0(0xc00032ba28, 0xc0000a5400, {0x193de30?, 0xc0018ce280?}, {0x7, {0x193aa78, 0xc0019f5230}, {0x0, 0x0}})
/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:610 +0x5d7
honnef.co/go/tools/go/ir.(*builder).expr(0x193ac08?, 0xc0000a5400, {0x193de30, 0xc0018ce280})
/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:566 +0x1fa
honnef.co/go/tools/go/ir.(*builder).emitCallArgs(0x193ac08?, 0xc0000a5400, 0xc0019bf680, 0xc0018ce2c0, {0x0?, 0x0, 0x8bb0a7?})
/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:975 +0x135
honnef.co/go/tools/go/ir.(*builder).setCall(0x1573640?, 0xc0000a5400, 0xc0018ce2c0, 0xc0005b9628)
/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:1037 +0x8e
honnef.co/go/tools/go/ir.(*builder).expr0(0xc00032ba28, 0xc0000a5400, {0x193de30?, 0xc0018ce2c0?}, {0x7, {0x193ab68, 0xc00189e620}, {0x0, 0x0}})
/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:623 +0x218e
honnef.co/go/tools/go/ir.(*builder).expr(0xc00032ae78?, 0xc0000a5400, {0x193de30, 0xc0018ce2c0})
/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:566 +0x1fa
honnef.co/go/tools/go/ir.(*builder).stmt(0xc0000a5400?, 0xc0000a5400, {0x193e370?, 0xc0018cd580?})
/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:2291 +0x194c
honnef.co/go/tools/go/ir.(*builder).stmtList(...)
/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:855
honnef.co/go/tools/go/ir.(*builder).switchStmt(0xc00032b308?, 0xc0000a5400, 0xc0018c7ce0, 0x0)
/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:1366 +0x19a5
honnef.co/go/tools/go/ir.(*builder).stmt(0x20?, 0xc0000a5400, {0x193e4c0?, 0xc0018c7ce0?})
/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:2365 +0x121c
honnef.co/go/tools/go/ir.(*builder).stmtList(0x8c1a25?, 0xc00032b4f8?, {0xc0018cd740?, 0x2, 0x8c3630?})
/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:855 +0x45
honnef.co/go/tools/go/ir.(*builder).stmt(0xc0000a5400?, 0xc0000a5400, {0x193ddd0?, 0xc0018c7d10?})
/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:2338 +0x9b9
honnef.co/go/tools/go/ir.(*builder).buildFunction(0xc00032ba28, 0xc0000a5400)
/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:2450 +0x3d7
honnef.co/go/tools/go/ir.(*builder).buildFuncDecl(0x0?, 0xc0003025a0, 0xc0018c7d40)
/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:2488 +0x19b
honnef.co/go/tools/go/ir.(*Package).build(0xc0003025a0)
/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:2594 +0xc16
sync.(*Once).doSlow(0xc0016fe0e0?, 0xc0019b9b30?)
/usr/local/go/src/sync/once.go:74 +0xc2
sync.(*Once).Do(...)
/usr/local/go/src/sync/once.go:65
honnef.co/go/tools/go/ir.(*Package).Build(...)
/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:2512
honnef.co/go/tools/internal/passes/buildir.run(0xc00049e3c0)
/go/pkg/mod/honnef.co/go/[email protected]/internal/passes/buildir/buildir.go:86 +0x368
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyze(0xc00103e150)
/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/runner_action.go:188 +0x9df
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func2()
/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/runner_action.go:106 +0x1d
github.com/golangci/golangci-lint/pkg/timeutils.(*Stopwatch).TrackStage(0xc000f76ff0, {0x16d616e, 0x7}, 0xc0011c6748)
/go/pkg/mod/github.com/golangci/[email protected]/pkg/timeutils/stopwatch.go:111 +0x4a
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe(0xc00075d440?)
/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/runner_action.go:105 +0x85
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze.func2(0xc00103e150)
/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/runner_loadingpackage.go:80 +0xb4
created by github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze
/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/runner_loadingpackage.go:75 +0x1eb
WARN [runner] Can't run linter goanalysis_metalinter: goanalysis_metalinter: buildir: package "netip" (isInitialPkg: false, needAnalyzeSource: true): in net/netip.AddrFromSlice: cannot convert Load <[]byte> t0 ([]byte) to [4]byte
ERRO Running error: 1 error occurred:
* can't run linter goanalysis_metalinter: goanalysis_metalinter: buildir: package "netip" (isInitialPkg: false, needAnalyzeSource: true): in net/netip.AddrFromSlice: cannot convert Load <[]byte> t0 ([]byte) to [4]byte I tried:
|
Beta Was this translation helpful? Give feedback.
Answered by
atc0005
Dec 14, 2022
Replies: 2 comments
-
Relevant: |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
atc0005
-
Update (FWIW): As of ldez@1af8a00, golangci-lint builds/runs within a Go 1.20rc2 Docker image. See #3414 for current details. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Relevant: