]> Cypherpunks repositories - gostls13.git/commit
cmd/go: print toolchain switching with GODEBUG=toolchaintrace
authorSam Thanawalla <samthanawalla@google.com>
Tue, 3 Sep 2024 14:51:01 +0000 (14:51 +0000)
committerSam Thanawalla <samthanawalla@google.com>
Wed, 18 Sep 2024 19:48:13 +0000 (19:48 +0000)
commitc71b5ff76a1b1d79b53e268b83fb721e0af4614b
treee796daa74fa6c9808af068984070fe8305eb1387
parente190638f204366bb509b77931aa58543b6300910
cmd/go: print toolchain switching with GODEBUG=toolchaintrace

This CL introduces the ability to print information about the toolchain switch used in the
go command, controlled by the `toolchaintrace` setting. This setting defaults to `toolchaintrace=0`,
meaning no information is printed. Setting it to `toolchaintrace=1` will cause the go command
to print a message indicating the toolchain used and where it was found.

Fixes: #63939
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-windows-amd64-longtest
Change-Id: Idc58e3d5bc76573aa48e1f7df352caa13004c25e
Reviewed-on: https://go-review.googlesource.com/c/go/+/610235
Reviewed-by: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/go/internal/toolchain/exec.go
src/cmd/go/internal/toolchain/select.go
src/cmd/go/testdata/script/gotoolchain_godebug_trace.txt [new file with mode: 0644]