You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ go mod init repro
$ go mod tidy
$ GODEBUG=inittrace=1 go run .
// snip init output
test program
$ GODEBUG=inittrace=1 go build .
// snip init output
$ go run .
// snip init output, again!
test program
In my quickie reproductions, it seems to be necessary to both go run and go build with GODEBUG set before doing it without to cause the issue. It also wasn't enough for the program to have no dependencies or the dependency to be rsc.io/quote. google.golang.org/api/drive/v3 was a real dependency in my program when I hit the bug. I don't know if it is necessary, but it is sufficient to trigger it. Maybe there needs to be some level of depth/size to the dependency to trigger it. Once the bug has been triggered, the debug information will stay even if you change fmt.Println("test program") to different text.
What did you expect to see?
No more init tracing when GODEBUG is unset.
What did you see instead?
Init continued to be traced until I ran go clean -cache.
The text was updated successfully, but these errors were encountered:
What version of Go are you using (
go version
)?go version go1.16.6 darwin/amd64
Does this issue reproduce with the latest release?
It seems to reproduce with go1.17rc2.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
main.go:
In my quickie reproductions, it seems to be necessary to both go run and go build with GODEBUG set before doing it without to cause the issue. It also wasn't enough for the program to have no dependencies or the dependency to be
rsc.io/quote
. google.golang.org/api/drive/v3 was a real dependency in my program when I hit the bug. I don't know if it is necessary, but it is sufficient to trigger it. Maybe there needs to be some level of depth/size to the dependency to trigger it. Once the bug has been triggered, the debug information will stay even if you changefmt.Println("test program")
to different text.What did you expect to see?
No more init tracing when GODEBUG is unset.
What did you see instead?
Init continued to be traced until I ran
go clean -cache
.The text was updated successfully, but these errors were encountered: