-
Notifications
You must be signed in to change notification settings - Fork 763
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
adding go runtime base to PATH interacts very badly with goenv #1098
Comments
@rbtcollins thanks for the report. Is your goal to use a different version (1.14.13) of Go from your integrated terminal while your extension is using 1.15.6 for the language server, analysis, testing, and debugging by default? Or was the intention to use 1.14.13 for the project, but the extension picked up 1.15.6 despite you set 1.14.13 as the |
The goal was to use 1.14.13 for the project, for the toolchain, and for the integrated terminal. My desktop is a Windows 10 Professional. The Go environment is an Ubuntu VM being accessed via the Remote-SSH extension, if that helps. |
@rbtcollins My apologies. This issue fell through the cracks and I failed to follow up. :-( Can you please verify if the in-vscode tool invocation is actually using the 1.14.13 ?
The PATH modification for shell happens only when the go binary to be used by the extension can't be found in PATH. I originally thought this was related to #776 ( |
Change https://golang.org/cl/336409 mentions this issue: |
I have the same problem, what is the solution now? I can't get goenv and vscode to work properly using SSH remote. |
@huanghantao As shown in the cl title of the last comment, |
What version of Go, VS Code & VS Code Go extension are you using?
$ code -v
1.52.1
ea3859d4ba2f3e577a159bc91e3074c5d85c0523
x64
Consider this path:
Note that go 1.15.6 is in the path.
In
.vscode/settings.json
:But yet, from the same directory from a shell not spawned under vs-code:
As far as I can tell, the in-vscode tool invocation is using the override 1.14.13 root/path etc; the shell is not only because vscode is adding 1.15.6 to the path (which you can tell is vscode because it is before the vscode-server entry in the path).
Making this optional would be a great help to those of us using goenv to manage multiple go versions and switch between them - we usually have the right GOROOT, a sane GOPATH etc, and need to have the shim entry in PATH, not the runtime base.
The text was updated successfully, but these errors were encountered: