Skip to content
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

Problem where env has been set after other extensions read the environment #725

Open
thernstig opened this issue Mar 6, 2024 · 0 comments

Comments

@thernstig
Copy link

There is a long standing issue here, see microsoft/vscode-eslint#1596. I hope you have the stamina to read it.

Basically the extension vscode-eslint has a setting "eslint.runtime": "node" that is set in the workspace settings .vscode/settings.json . It means it reads the node version from the environment.

We load the node version via direnv. I think this comment best sums it up: microsoft/vscode-eslint#1596 (comment)

Apparently the ESLint server, or any extension, inherits the environment from the extension host. It seems there is a race condition where direnv-vscode has not updated the enviroment, meaning that e.g. eslint-vscode cannot find the node version as it is in in the PATH.

I added a question in that thread as well that maybe the extension host itself should have an event if the environment is reloaded in some sense, so that it could be emitted so that all extensions could listen for it, and restart if needed or similar. Not sure if that is a good idea or not, but throwing it out here as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant