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
Aqua managed gopls is causing termination of VSCode #1597
Comments
I guess this issue is related.
You can change the behavior by setting the environment variable $ export AQUA_EXPERIMENTAL_X_SYS_EXEC=true https://aquaproj.github.io/docs/reference/experimental-feature/#aqua_experimental_x_sys_exec But this flag affects not only specific packages but also all packages. And this feature has a known issue on macOS. We haven't investigated this issue for a long time, so I'm not sure the current status of this issue. |
Maybe the following alias works. alias gopls="$(aqua which gopls)"
Or adding the following script #!/usr/bin/env bash
exec "$(aqua which gopls)" "$@" |
And I'm considering enabling AQUA_EXPERIMENTAL_X_SYS_EXEC is disabled by default because there is a known issue, but if we restrict packages maybe we can enable the feature. |
I load VSCode code from the terminal so env vars are honored. I also use direnv so I think that would work. I'll give it a shot and report back when I get a chance. |
Any updated recommendation on best practice here? I've had a few crashes with vscode still, but prefer to keep using aqua to install Go. |
Did you try this? |
Let me look again. I flipped for a while to brew managed go, but really wanted to keep things consistent. Here's the catch though... might be Go, not just gopls. [🧱 INT] zsh _ ❯ which -a gopls
/Users/sheldon.hull/go/bin/gopls I don't have gopls through aqua anymore, just Go. I might try the same approach and use a fully qualified name for Go as well and see if that works. |
Sorry. I guess you have to run not gopls but go directly. alias go="$(aqua which go)" #!/usr/bin/env bash
exec "$(aqua which go)" "$@" And this doesn't work if Go isn't installed yet because #!/usr/bin/env bash
go version > /dev/null 2>&1 # Install Go by lazy install
exec "$(aqua which go)" "$@" |
Using the bash script in place on It's a bit clunky so do you have any ideas to solve in aqua itself so folks can easily rely on Aqua for managing their Go installs without any workarounds? |
Thank you for your feedback. Sounds good.
On Linux |
I'm on macOS, so unfortunately that option isn't viable. I want to make sure it works for both Linux + macOS due to the users I'm helping. Thanks again! |
aqua version
Please use the latest version.
aqua version 1.32.0 (aacad331354797eed1acbab454f25e4423129f58)
Environment
macOS
amd64
Ran into a similar situation with gopls installed via vscode causing termination of VSCode. I installed Go via Brew, and made it the priority on my PATH variable and confirmed the issue was not present when brew installed Go.
Is there a way to opt out of proxy behavior for certain packages to ensure it works and this doesn't happen again?
I did not set any experimental flags either.
Reported Issue: golang/vscode-go#2625
Please let me know what info would be useful for your diagnosing further.
The text was updated successfully, but these errors were encountered: