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
Failed to run 'C:\Users\R\golang\go\bin\go.exe env' (cwd: C:\Users\R\golang): Error: Command failed: C:\Users\R\golang\go\bin\go.exe env -json GOPATH GOROOT GOPROXY GOBIN GOMODCACHE
go: downloading go1.22 (windows/amd64)
go: download go1.22 for windows/amd64: toolchain not available
go: downloading go1.22 (windows/amd64)
go: download go1.22 for windows/amd64: toolchain not available
What did you do?
I have set up local go lang/go development go1.22 with go.work as go1.22
I have not set PATH for bin/go1.22
When I open the editor, it is not giving option to configure local go development(go1.22) - Choose go environment is not available.
And none of the go commands are working, go version or go env until I get out of the go.work folder, which is configured as 1.22
What did you expect to see?
Atleast an option for development editor with the help of gopls to configure local ./bin/go1.22
Instead of below error, which is correct
go: download go1.22 for windows/amd64: toolchain not available
but can be more actionable like
go: download go1.22 for windows/amd64: toolchain not available as configured in module or workspace. However you have go1.21.3, make that as your toolchain (lower version) or set PATH for go1.22
However I cannot set lower version as my development of 1.22
What did you see instead?
go: download go1.22 for windows/amd64: toolchain not available
Failed to run 'C:\Users\R\golang\go\bin\go.exe env' (cwd: C:\Users\R\golang): Error: Command failed: C:\Users\R\golang\go\bin\go.exe env -json GOPATH GOROOT GOPROXY GOBIN GOMODCACHE
Editor and settings
Logs
The text was updated successfully, but these errors were encountered:
raghvenders
added
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
labels
Nov 3, 2023
@raghvenders There are many different ways, but I think the easiest is to configure your PATH to include the directory where the go1.22 binary exists. Then, when gopls invokes go for the project that specifies go 1.22, the go command will search the PATH and switch to go1.22 binary underneath.
~/godemo$ cat go.mod
module example.com/m
go 1.99999
~/godemo$ ls ./bin
go1.99999
~/godemo$ PATH=$(pwd)/bin:$PATH go version
go1.99999
~/godemo$ cat ./bin/go1.99999
#!/bin/bash
echo "go1.99999"
gopls version
gopls@v0.13.2
go env
Failed to run 'C:\Users\R\golang\go\bin\go.exe env' (cwd: C:\Users\R\golang): Error: Command failed: C:\Users\R\golang\go\bin\go.exe env -json GOPATH GOROOT GOPROXY GOBIN GOMODCACHE
go: downloading go1.22 (windows/amd64)
go: download go1.22 for windows/amd64: toolchain not available
go: downloading go1.22 (windows/amd64)
go: download go1.22 for windows/amd64: toolchain not available
What did you do?
What did you expect to see?
Atleast an option for development editor with the help of gopls to configure local ./bin/go1.22
Instead of below error, which is correct
but can be more actionable like
However I cannot set lower version as my development of 1.22
What did you see instead?
Editor and settings
Logs
The text was updated successfully, but these errors were encountered: