-
Notifications
You must be signed in to change notification settings - Fork 206
Conversation
4fe7097
to
a0f56d0
Compare
There are already other functions which catch exceptions in HIE. Did you look at using one of those rather than rolling your own using |
Indeed, catching |
Catch all IOExceptions that hlint might throw
a0f56d0
to
6751e45
Compare
Now we catch |
@mpickering I am actually in favor of aggressive error-catching from It is the best thing for |
@power-fungus The problem is catching async exceptions such as interrupts. |
Indeed, async exceptions should not be caught |
I would argue that language servers should be a bit overdramatic and crash frequently: VS Code automatically restarts the server if it dies, and from what I recall with the ghc-mod plugin, the design is to propagate as many fatal errors as possible |
Hlint errors dont have to be fatal ones though. In that case, hlint would just not work, while other functionality is still working. |
I'm against being overdramatic, too. While VSCode may handle this well, LanguageClient-neovim stumbles on server crashes and i suspect other client may do this too. As a side note: LSP should be general overall, so coding against behaviour of specific client isn't right thing to do - remember embrace&extend&extuinguish. There are plenty of VSCode-specific quirks in other clients/servers already. |
The problem with crashing frequently is many language clients, I have used don't restart servers. If the server can recover it should try to. If possible plugins should be restarted. |
LGTM, now it is catching IOException. |
Related to #1143
Also improves stability of hie, thus related to #1146
If hlint chokes on anything, dont kill hie.
An error message might be desirable but I dont know how to do that.