> tree
.
├── ent
│ └── schema
│ └── hello.go
├── go.mod
├── go.sum
└── main.go
go run -mod=mod entgo.io/ent/cmd/ent generate --feature sql/upsert --target ./ent ./ent/schema
ERRO [linters_context/goanalysis] buildssa: panic during analysis: in main/ent.withHooks$1: cannot convert *t0 (M) to PM, goroutine 3115 [running]:
runtime/debug.Stack()
/opt/homebrew/Cellar/go/1.20.4/libexec/src/runtime/debug/stack.go:24 +0x64
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func1()
/Users/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/runner_action.go:105 +0x4c
panic({0x105dad320, 0x14002769470})
/opt/homebrew/Cellar/go/1.20.4/libexec/src/runtime/panic.go:884 +0x204
golang.org/x/tools/go/ssa.emitConv(0x14000858d80, {0x105f92d00, 0x14002785500}, {0x105f8a1a0?, 0x14003416120})
/Users/go/pkg/mod/golang.org/x/[email protected]/go/ssa/emit.go:286 +0xb4c
golang.org/x/tools/go/ssa.emitStore(0x14000858d80, {0x105f92d00, 0x14002785440}, {0x105f92d00, 0x14002785500}, 0x2b27dc8)
/Users/go/pkg/mod/golang.org/x/[email protected]/go/ssa/emit.go:377 +0x58
golang.org/x/tools/go/ssa.(*address).store(0x140027437d0, 0x14000858d80?, {0x105f92d00?, 0x14002785500?})
/Users/go/pkg/mod/golang.org/x/[email protected]/go/ssa/lvalue.go:40 +0x4c
golang.org/x/tools/go/ssa.(*storebuf).emit(...)
/Users/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:533
golang.org/x/tools/go/ssa.(*builder).assignStmt(0x14000858d80?, 0x14000858d80, {0x1400099e8d0, 0x1, 0x105f26260?}, {0x1400099e900, 0x1, 0x104fad5a0?}, 0x0)
/Users/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:1207 +0x378
golang.org/x/tools/go/ssa.(*builder).stmt(0x14003ebe838?, 0x14000858d80, {0x105f8d080?, 0x14002d92440?})
/Users/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:2181 +0x38c
golang.org/x/tools/go/ssa.(*builder).stmtList(0x140027435c0?, 0x0?, {0x14002d92480?, 0x4, 0x30?})
/Users/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:946 +0x48
golang.org/x/tools/go/ssa.(*builder).stmt(0x14000858d80?, 0x14000858d80, {0x105f8d1a0?, 0x140016ea9f0?})
/Users/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:2277 +0x730
golang.org/x/tools/go/ssa.(*builder).buildFunctionBody(0x0?, 0x14000858d80)
/Users/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:2391 +0x368
golang.org/x/tools/go/ssa.(*builder).expr0(0x14003ebf9f8, 0x14003e90000, {0x105f8d440?, 0x1400099f300?}, {0x7, {0x105f8a0b0, 0x14000e1e240}, {0x0, 0x0}})
/Users/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:656 +0x4ac
golang.org/x/tools/go/ssa.(*builder).expr(0x105e1c6c0?, 0x14003e90000, {0x105f8d440, 0x1400099f300})
/Users/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:625 +0x11c
golang.org/x/tools/go/ssa.(*builder).expr0(0x14003ebf9f8, 0x14003e90000, {0x105f8d200?, 0x14002d92500?}, {0x7, {0x105f8a038, 0x14002118cb0}, {0x0, 0x0}})
/Users/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:676 +0x688
golang.org/x/tools/go/ssa.(*builder).expr(0x105f18480?, 0x14003e90000, {0x105f8d200, 0x14002d92500})
/Users/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:625 +0x11c
golang.org/x/tools/go/ssa.(*builder).assign(0x14003e90000?, 0x14003e90000?, {0x105f8fba8?, 0x14002743530}, {0x105f8d200?, 0x14002d92500?}, 0x8?, 0x0)
/Users/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:598 +0x314
golang.org/x/tools/go/ssa.(*builder).localValueSpec(0x14003e90000?, 0x14003e90000, 0x140037b7e50)
/Users/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:1147 +0xb8
golang.org/x/tools/go/ssa.(*builder).stmt(0x14003ebf548?, 0x14003e90000, {0x105f8d2f0?, 0x1400099f340?})
/Users/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:2147 +0x1584
golang.org/x/tools/go/ssa.(*builder).stmtList(0x14003ebf5c8?, 0x104fea000?, {0x14003168980?, 0x8, 0x10?})
/Users/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:946 +0x48
golang.org/x/tools/go/ssa.(*builder).stmt(0x14003e90000?, 0x14003e90000, {0x105f8d1a0?, 0x140016eac30?})
/Users/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:2277 +0x730
golang.org/x/tools/go/ssa.(*builder).buildFunctionBody(0x14003e80d80?, 0x14003e90000)
/Users/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:2391 +0x368
golang.org/x/tools/go/ssa.(*builder).buildFunction(0x1054f6560?, 0x14003e90000)
/Users/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:2326 +0x30
golang.org/x/tools/go/ssa.(*builder).buildCreated(0x14003ebf9f8)
/Users/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:2413 +0x28
golang.org/x/tools/go/ssa.(*Package).build(0x14001d68c80)
/Users/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:2606 +0xae0
sync.(*Once).doSlow(0x140004b6180?, 0x140037fb9f0?)
/opt/homebrew/Cellar/go/1.20.4/libexec/src/sync/once.go:74 +0x104
sync.(*Once).Do(...)
/opt/homebrew/Cellar/go/1.20.4/libexec/src/sync/once.go:65
golang.org/x/tools/go/ssa.(*Package).Build(...)
/Users/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:2477
golang.org/x/tools/go/analysis/passes/buildssa.run(0x140032fe780)
/Users/go/pkg/mod/golang.org/x/[email protected]/go/analysis/passes/buildssa/buildssa.go:72 +0x13c
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyze(0x140010be3f0)
/Users/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/runner_action.go:195 +0x990
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func2()
/Users/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/runner_action.go:113 +0x20
github.com/golangci/golangci-lint/pkg/timeutils.(*Stopwatch).TrackStage(0x140011b4050, {0x105a94d1e, 0x8}, 0x14001498730)
/Users/go/pkg/mod/github.com/golangci/[email protected]/pkg/timeutils/stopwatch.go:111 +0x44
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe(0x1054b8170?)
/Users/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/runner_action.go:112 +0x74
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze.func2(0x140010be3f0)
/Users/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/runner_loadingpackage.go:80 +0xb0
created by github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze
/Users/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/runner_loadingpackage.go:75 +0x17c
ERRO [runner] Panic: bodyclose: package "ent" (isInitialPkg: true, needAnalyzeSource: true): interface conversion: interface {} is nil, not *buildssa.SSA: goroutine 3110 [running]:
runtime/debug.Stack()
/opt/homebrew/Cellar/go/1.20.4/libexec/src/runtime/debug/stack.go:24 +0x64
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func1()
/Users/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/runner_action.go:109 +0x238
panic({0x105e3ef00, 0x14001830480})
/opt/homebrew/Cellar/go/1.20.4/libexec/src/runtime/panic.go:884 +0x204
github.com/timakin/bodyclose/passes/bodyclose.runner.run({0x140032fe870, {0x0, 0x0}, 0x0, {0x0, 0x0}, 0x0, 0x0}, 0x140032fe870)
/Users/go/pkg/mod/github.com/timakin/[email protected]/passes/bodyclose/bodyclose.go:45 +0x5d0
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyze(0x140010be360)
/Users/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/runner_action.go:195 +0x990
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func2()
/Users/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/runner_action.go:113 +0x20
github.com/golangci/golangci-lint/pkg/timeutils.(*Stopwatch).TrackStage(0x140011b4050, {0x105aa3ad6, 0x9}, 0x14000ba3730)
/Users/go/pkg/mod/github.com/golangci/[email protected]/pkg/timeutils/stopwatch.go:111 +0x44
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe(0x1054b8170?)
/Users/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/runner_action.go:112 +0x74
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze.func2(0x140010be360)
/Users/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/runner_loadingpackage.go:80 +0xb0
created by github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze
/Users/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/goanalysis/runner_loadingpackage.go:75 +0x17c
WARN [runner] Can't run linter goanalysis_metalinter: goanalysis_metalinter: bodyclose: package "ent" (isInitialPkg: true, needAnalyzeSource: true): interface conversion: interface {} is nil, not *buildssa.SSA
ERRO Running error: 1 error occurred:
* can't run linter goanalysis_metalinter: goanalysis_metalinter: bodyclose: package "ent" (isInitialPkg: true, needAnalyzeSource: true): interface conversion: interface {} is nil, not *buildssa.SSA