elm-language-server
elm-language-server copied to clipboard
Elm is not found, but elm is using 100% CPU
When working on elm-format, the project is not an Elm project, but there are Elm files that I sometimes have to open. When I open an Elm file in that case, vscode says it cannot find elm, but then it also starts an elm make
process that uses 100% CPU and never terminates.
Expected Behavior
- elm should not be run, given that it's reported to not be found (or if it is run, it should immediately fail because there is no elm.json file, and not continually use CPU)
Current Behavior
- "Cannot find executable with name 'elm'" is shown
- "Elm binary not found, did you install and setup the path to your bina..." is shown
-
elm make
is executed (it is a child of the/snap/codium/135/usr/share/codium/codium /home/avh4/.vscode-oss/extensions/elmtooling.elm-ls-vscode-2.0.3/server/out/index.js --node-ipc --clientProcessId=181954
process
Possible Solution
Steps to Reproduce (for bugs)
- open the elm-format folder in vscode
- open an elm file, for example, tests/test-files/good/Elm-0.19/AllSyntax/Patterns.elm
Context
I have had to frequently kill the elm process that is started.
Your Environment
- Version used: elm-ls-vscode-2.0.3
- Editor used: VSCodium 1.53.0 (snap)
- Environment name and version (e.g. node.js 5.4): node.js 12.18.3 / Electron 11.2.1
- Operating System and version: Linux x64 5.8.0-43-generic (Ubuntu 20.04.2)
I can't reproduce the same error messages or the process getting stuck (if it gets run). But the errors I'm seeing can be fixed by removing this line: https://github.com/elm-tooling/elm-language-client-vscode/blob/master/package.json#L26
But that's quiet a nuclear option, might be better to have a deeper look.