-
Notifications
You must be signed in to change notification settings - Fork 182
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
Install LS into dedicated (persistent) global storage #811
Conversation
1554763
to
334c9e8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed installed to $env:APPDATA\Code\User\globalStorage\hashicorp.terraform\bin\terraform-ls.exe
, and subsequent starts uses that path
Is it possible configure the path? LS stopped working because my company doesn't allow to run executables from the new path. |
@husunal Just to understand the policy and context, what path(s) your company does allow to run executables from? Also is there any justification that the company has for preventing execution from these paths? FWIW You can maintain a custom installation by following these steps depending on your platform https://github.com/hashicorp/terraform-ls#installation and setting path in settings under Lines 100 to 105 in 943a57b
The downside is that it will not be automatically updated for you - you would have to rely on the relevant package manager in your Linux distribution or Homebrew in macOS. |
We are using It would be good to support |
I see - I didn't even know this variable existed! Thank you for the added context. I wonder if there is any similar ENV variable that can be used to change the default path for extension data. https://github.com/microsoft/vscode/blob/39f00c538037546af30ac49d06203b9bb8ddadb3/src/vs/platform/environment/common/environmentService.ts#L87-L88 suggests there isn't, but perhaps VS Code would be open to contributions. That way you would be able to set that variable (say Would that work for you? |
FWIW the (new) path we use is basically recommended by VS Code for extension to use to persist data and it doesn't seem that unusual to place executables in that path. I can see Microsoft's own extension installs some executables there too:
|
Any var name or VSCode extension setting that will allow us to configure the path for the language server and doesn't require managing a custom installation would work. As a temporary workaround I downgraded the extension to the previous version. |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Closes #739
This changes where the language server gets installed upon first extension activation, or upgrade.
Previously we would install it under:
(macOS)
/Users/radeksimko/.vscode/extensions/hashicorp.terraform-2.15.0/lsp/terraform-ls
now we install it into:
(macOS)
/Users/radeksimko/Library/Application Support/Code/User/globalStorage/hashicorp.terraform/bin/terraform-ls
The intended benefit of this change is that LS doesn't need to be re-installed whenever an extension version changes and also we can reduce the likelihood of running into restrictive FS permissions which may rightly be applied to the
~/.vscode
in some cases.