gotraceui icon indicating copy to clipboard operation
gotraceui copied to clipboard

Is it possible to open traces from 1.24 go?

Open dolzenko opened this issue 10 months ago • 6 comments

When I try opening traces collected from 1.24 app with latest gotraceui (run from go 1.23)

 go1.23.0 run honnef.co/go/gotraceui/cmd/gotraceui@latest

I get

Image

dolzenko avatar Mar 04 '25 13:03 dolzenko

For the moment you will have to use master instead of latest.

dominikh avatar Mar 04 '25 18:03 dominikh

Sorry for bothering, I know you're in the middle of rewriting things, probably I should just wait? But with master repo clone

 go1.23.0 run cmd/gotraceui/main.go                                                                                       ─╯
# command-line-arguments
cmd/gotraceui/main.go:178:14: undefined: ObjectLink
cmd/gotraceui/main.go:180:18: undefined: ObjectLink
cmd/gotraceui/main.go:300:2: undefined: HoveredLinker
cmd/gotraceui/main.go:310:18: undefined: Canvas
cmd/gotraceui/main.go:311:19: undefined: Trace
cmd/gotraceui/main.go:318:6: undefined: GCScheduler
cmd/gotraceui/main.go:346:15: undefined: DebugWindow
cmd/gotraceui/main.go:607:6: undefined: Canvas
cmd/gotraceui/main.go:1266:2: undefined: HoveredLinker
cmd/gotraceui/main.go:1455:17: undefined: Trace
cmd/gotraceui/main.go:1455:17: too many errors

running from URL

go1.23.0 run honnef.co/go/gotraceui/cmd/gotraceui@master                                        ─╯
go: downloading honnef.co/go/gotraceui v0.5.0-0.dev.0.20250304232220-00289f5f4c1d
go: honnef.co/go/gotraceui/cmd/gotraceui@master (in honnef.co/go/[email protected]):
        The go.mod file for the module providing named packages contains one or
        more replace directives. It must not contain directives that would cause
        it to be interpreted differently than if it were the main module.

dolzenko avatar Mar 05 '25 06:03 dolzenko

For the moment you will have to use master instead of latest.

maybe we could go mod vendor it. Use go work first, then vendor it, last remove the go.work file.

ddkwork avatar Mar 05 '25 06:03 ddkwork

Sorry for bothering, I know you're in the middle of rewriting things, probably I should just wait? But with master repo clone

 go1.23.0 run cmd/gotraceui/main.go                                                                                       ─╯
# command-line-arguments
cmd/gotraceui/main.go:178:14: undefined: ObjectLink
cmd/gotraceui/main.go:180:18: undefined: ObjectLink
cmd/gotraceui/main.go:300:2: undefined: HoveredLinker
cmd/gotraceui/main.go:310:18: undefined: Canvas
cmd/gotraceui/main.go:311:19: undefined: Trace
cmd/gotraceui/main.go:318:6: undefined: GCScheduler
cmd/gotraceui/main.go:346:15: undefined: DebugWindow
cmd/gotraceui/main.go:607:6: undefined: Canvas
cmd/gotraceui/main.go:1266:2: undefined: HoveredLinker
cmd/gotraceui/main.go:1455:17: undefined: Trace
cmd/gotraceui/main.go:1455:17: too many errors

You want go1.23.0 run ./cmd/gotraceui - trying to build a single file from a package is not the same as building the package.

running from URL

go1.23.0 run honnef.co/go/gotraceui/cmd/gotraceui@master                                        ─╯
go: downloading honnef.co/go/gotraceui v0.5.0-0.dev.0.20250304232220-00289f5f4c1d
go: honnef.co/go/gotraceui/cmd/gotraceui@master (in honnef.co/go/[email protected]):
        The go.mod file for the module providing named packages contains one or
        more replace directives. It must not contain directives that would cause
        it to be interpreted differently than if it were the main module.

This is infuriating. I will look into it.

dominikh avatar Mar 05 '25 17:03 dominikh

@dominikh fantastic, I'm finally able to run it and open the traces, thank you very much for sharing the software and the knowledge ❤ .

dolzenko avatar Mar 06 '25 06:03 dolzenko