-
Notifications
You must be signed in to change notification settings - Fork 17.5k
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. |
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: