-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
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
cmd/go: provide an option to print toolchain switch #63939
Comments
I think the existing |
@bcmills , @hyangah - I would like to work on this feature change. Currently I did a small local setup on this go.mod file. Which are those go commands we can show the information about switch?
by local go env modifies as below
Note : Current relevant go [...] -x shows the updated toolchain location. |
Are we refering situations mentioned - https://go.dev/doc/toolchain - Go toolchain switches, especially after it has been switched , but not showing the message during subsequent calls ? |
Can we fix this issue - cmd/go: go env GOMOD tries to download newer toolchain #61455 along with this. It has to make an appropriate switch here? |
@hyangah - I did try to address for "toolchain not available" issue and switching to go version executing this command or local available go in PATH.
|
@raghvenders, I think #61455 is basically orthogonal to this issue: this one is about logging when we do switch toolchains, while the other is about whether we switch toolchains at all for a particular command. |
sure I will send a separate CL for this one. |
@bcmills @hyangah - here is the CL for this - https://go-review.googlesource.com/c/go/+/548437 I have few questions currently toolchain switch is called at the very base of pretty every go command.
Kindly suggest. |
Change https://go.dev/cl/584120 mentions this issue: |
Probably GODEBUG=toolchaintrace=1 to get toolchain switch tracing. |
Change https://go.dev/cl/610235 mentions this issue: |
Change https://go.dev/cl/614237 mentions this issue: |
For: golang/go#63939 Change-Id: I66ad4f766f9d62280247fa0787d20f7faac319fe Reviewed-on: https://go-review.googlesource.com/c/website/+/614237 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Matloob <matloob@golang.org>
Change https://go.dev/cl/634275 mentions this issue: |
For: golang/go#63939 Updates: golang/go#68545 Change-Id: I1ee3eae7dd93e09350ebc2febe19535adbbf8a76 Reviewed-on: https://go-review.googlesource.com/c/website/+/634275 Auto-Submit: Sam Thanawalla <samthanawalla@google.com> Reviewed-by: Michael Matloob <matloob@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Sometimes we want to trace how and where
go
picks up the target toolchain.(is it from module cache? or is it from one of my PATH that may have a symlink?)
Either a debug environment variable or a flag (
-x
or-v
) to enable tool switch activity logging can be helpful.The text was updated successfully, but these errors were encountered: