We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
go version go1.24.0 darwin/arm64
go env
AR='ar' CC='cc' CGO_CFLAGS='-O2 -g' CGO_CPPFLAGS='' CGO_CXXFLAGS='-O2 -g' CGO_ENABLED='1' CGO_FFLAGS='-O2 -g' CGO_LDFLAGS='-O2 -g' CXX='c++' GCCGO='gccgo' GO111MODULE='' GOARCH='arm64' GOARM64='v8.0' GOAUTH='netrc' GOBIN='' GOCACHE='/Users/$USER/Library/Caches/go-build' GOCACHEPROG='' GODEBUG='' GOENV='/Users/$USER/Library/Application Support/go/env' GOEXE='' GOEXPERIMENT='' GOFIPS140='off' GOFLAGS='' GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/30/fz7ryvm518v086x8wqbq_pfw0000gn/T/go-build3461295816=/tmp/go-build -gno-record-gcc-switches -fno-common' GOHOSTARCH='arm64' GOHOSTOS='darwin' GOINSECURE='' GOOS='darwin' GOPATH='/Users/$USER/go' GOPROXY='https://proxy.golang.org,direct' GOROOT='/opt/homebrew/Cellar/go/1.24.0/libexec' GOSUMDB='sum.golang.org' GOTELEMETRY='local' GOTELEMETRYDIR='/Users/$USER/Library/Application Support/go/telemetry' GOTMPDIR='' GOTOOLCHAIN='auto' GOTOOLDIR='/opt/homebrew/Cellar/go/1.24.0/libexec/pkg/tool/darwin_arm64' GOVCS='' GOVERSION='go1.24.0' GOWORK='' PKG_CONFIG='pkg-config'
Added callgraph to go.mod like this: tool golang.org/x/tools/cmd/callgraph
tool golang.org/x/tools/cmd/callgraph
then call it with: go tool callgraph -format digraph cmd/$PROJECT/main.go
go tool callgraph -format digraph cmd/$PROJECT/main.go
`panic: Cannot range over: func(yield func(string) bool)
goroutine 3375 [running]: golang.org/x/tools/go/ssa.(*builder).rangeStmt(0x14017fce080, 0x14018073380, 0x14003046180, 0x0) /Users/$USER/go/pkg/mod/golang.org/x/tools@v0.20.0/go/ssa/builder.go:2278 +0x850 golang.org/x/tools/go/ssa.(*builder).stmt(0x14017fce080, 0x14018073380, {0x100f7bdf8?, 0x14003046180?}) /Users/$USER/go/pkg/mod/golang.org/x/tools@v0.20.0/go/ssa/builder.go:2508 +0x138 golang.org/x/tools/go/ssa.(*builder).stmtList(...) /Users/$USER/go/pkg/mod/golang.org/x/tools@v0.20.0/go/ssa/builder.go:908 golang.org/x/tools/go/ssa.(*builder).stmt(0x14017fce080, 0x14018073380, {0x100f7bac8?, 0x1400332f230?}) /Users/$USER/go/pkg/mod/golang.org/x/tools@v0.20.0/go/ssa/builder.go:2470 +0x13b8 golang.org/x/tools/go/ssa.(*builder).buildFromSyntax(0x14017fce080, 0x14018073380) /Users/$USER/go/pkg/mod/golang.org/x/tools@v0.20.0/go/ssa/builder.go:2582 +0x208 golang.org/x/tools/go/ssa.(*builder).buildFunction(0x1?, 0x14018073380) /Users/$USER/go/pkg/mod/golang.org/x/tools@v0.20.0/go/ssa/builder.go:2536 +0x10c golang.org/x/tools/go/ssa.(*builder).iterate(0x14017fce080) /Users/$USER/go/pkg/mod/golang.org/x/tools@v0.20.0/go/ssa/builder.go:2524 +0x2c golang.org/x/tools/go/ssa.(*Package).build(0x1401571ad80) /Users/$USER/go/pkg/mod/golang.org/x/tools@v0.20.0/go/ssa/builder.go:2658 +0xa4 sync.(*Once).doSlow(0x59?, 0x140103483b0?) /opt/homebrew/Cellar/go/1.24.0/libexec/src/sync/once.go:78 +0xf0 sync.(*Once).Do(...) /opt/homebrew/Cellar/go/1.24.0/libexec/src/sync/once.go:69 golang.org/x/tools/go/ssa.(*Package).Build(...) /Users/$USER/go/pkg/mod/golang.org/x/tools@v0.20.0/go/ssa/builder.go:2647 golang.org/x/tools/go/ssa.(*Program).Build.func1(0x0?) /Users/$USER/go/pkg/mod/golang.org/x/tools@v0.20.0/go/ssa/builder.go:2626 +0x50 created by golang.org/x/tools/go/ssa.(*Program).Build in goroutine 1 /Users/$USER/go/pkg/mod/golang.org/x/tools@v0.20.0/go/ssa/builder.go:2625 +0x178`
A nice digraph
The text was updated successfully, but these errors were encountered:
Related Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
Sorry, something went wrong.
upgrade x/tools, v0.20.0 is too old.
If someone stumbles apon this and you have configured the tool through go.mod: go get golang.org/x/tools@v0.30.0
No branches or pull requests
Go version
go version go1.24.0 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
Added callgraph to go.mod like this:
tool golang.org/x/tools/cmd/callgraph
then call it with:
go tool callgraph -format digraph cmd/$PROJECT/main.go
What did you see happen?
`panic: Cannot range over: func(yield func(string) bool)
goroutine 3375 [running]:
golang.org/x/tools/go/ssa.(*builder).rangeStmt(0x14017fce080, 0x14018073380, 0x14003046180, 0x0)
/Users/$USER/go/pkg/mod/golang.org/x/tools@v0.20.0/go/ssa/builder.go:2278 +0x850
golang.org/x/tools/go/ssa.(*builder).stmt(0x14017fce080, 0x14018073380, {0x100f7bdf8?, 0x14003046180?})
/Users/$USER/go/pkg/mod/golang.org/x/tools@v0.20.0/go/ssa/builder.go:2508 +0x138
golang.org/x/tools/go/ssa.(*builder).stmtList(...)
/Users/$USER/go/pkg/mod/golang.org/x/tools@v0.20.0/go/ssa/builder.go:908
golang.org/x/tools/go/ssa.(*builder).stmt(0x14017fce080, 0x14018073380, {0x100f7bac8?, 0x1400332f230?})
/Users/$USER/go/pkg/mod/golang.org/x/tools@v0.20.0/go/ssa/builder.go:2470 +0x13b8
golang.org/x/tools/go/ssa.(*builder).buildFromSyntax(0x14017fce080, 0x14018073380)
/Users/$USER/go/pkg/mod/golang.org/x/tools@v0.20.0/go/ssa/builder.go:2582 +0x208
golang.org/x/tools/go/ssa.(*builder).buildFunction(0x1?, 0x14018073380)
/Users/$USER/go/pkg/mod/golang.org/x/tools@v0.20.0/go/ssa/builder.go:2536 +0x10c
golang.org/x/tools/go/ssa.(*builder).iterate(0x14017fce080)
/Users/$USER/go/pkg/mod/golang.org/x/tools@v0.20.0/go/ssa/builder.go:2524 +0x2c
golang.org/x/tools/go/ssa.(*Package).build(0x1401571ad80)
/Users/$USER/go/pkg/mod/golang.org/x/tools@v0.20.0/go/ssa/builder.go:2658 +0xa4
sync.(*Once).doSlow(0x59?, 0x140103483b0?)
/opt/homebrew/Cellar/go/1.24.0/libexec/src/sync/once.go:78 +0xf0
sync.(*Once).Do(...)
/opt/homebrew/Cellar/go/1.24.0/libexec/src/sync/once.go:69
golang.org/x/tools/go/ssa.(*Package).Build(...)
/Users/$USER/go/pkg/mod/golang.org/x/tools@v0.20.0/go/ssa/builder.go:2647
golang.org/x/tools/go/ssa.(*Program).Build.func1(0x0?)
/Users/$USER/go/pkg/mod/golang.org/x/tools@v0.20.0/go/ssa/builder.go:2626 +0x50
created by golang.org/x/tools/go/ssa.(*Program).Build in goroutine 1
/Users/$USER/go/pkg/mod/golang.org/x/tools@v0.20.0/go/ssa/builder.go:2625 +0x178`
What did you expect to see?
A nice digraph
The text was updated successfully, but these errors were encountered: