-
-
Notifications
You must be signed in to change notification settings - Fork 390
Plugin failures should not take down or make hang HLS #1231
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
Comments
Thanks a lot! Indeed, feels similar (and, in fact, removing all these comments helped). Do you want me to close this one then, or would you like to keep it? |
It seems a bug that a dodgy plugin can take down anything - we should have approximately everything guarded by a catch, and always recover. So I think this bug report points to a lack of catch, and is thus useful separately. |
👌 Makes sense and, in fact, this has been my biggest concern:
|
I think I'm seeing this crash as well:
The input it seems to be complaining about " |
Well, plugins certainly shouldn't be failing with errors from partial functions (#2514). |
I think the key take away here is better error handling. |
I encounter a case where entire server is crashed by a failed parse in
Eval
plugin:The code that fails to parse looks more or less like this:
GHC has no problems with it.
In my humble opinion, the problem is not that this piece fails to parse for whatever reason but rather in that it crashes HLS.
Hope it helps! Thank you in advance
Your environment
Output of
haskell-language-server --probe-tools
orhaskell-language-server-wrapper --probe-tools
:haskell-language-server version: 0.8.0.0 (GHC: 8.8.4) (PATH: /nix/store/3dkwi0xnifx6882f1czw9x7hsv63qj0x-haskell-language-server-0.8.0.0/bin/haskell-language-server) Tool versions found on the $PATH cabal: Not found stack: 2.5.1 ghc: 8.10.3
Which lsp-client do you use:
VS CodiumDescribe your project (alternative: link to the project):
N/AContents of
hie.yaml
: N/ASteps to reproduce
In general, you have to find a piece that triggers the above behavior in Eval plugin and include it in a project. Judging by the logs, I'd say that it's caused by keywords in comments (but that does not seem right). You can, of course use, the one I provided (in case it didn't reproduce, I could try to find a minimal reproducer)
Expected behaviour
HLS should not crash (regardless of whether a piece of code can be parsed by the plugin or not)
Actual behaviour
HLS crashes - VS displays pop-up that it crashed more than x times and won't be restarted
Include debug information
Execute in the root of your project the command
haskell-language-server --debug .
and paste the logs here:Debug output:
Paste the logs from the lsp-client, e.g. for VS Code
LSP logs:
The text was updated successfully, but these errors were encountered: