LanguageServerProtocol icon indicating copy to clipboard operation
LanguageServerProtocol copied to clipboard

Treat more exception types as non-fatal

Open baronfel opened this issue 3 years ago • 3 comments

Potentially fix https://github.com/fsharp/FsAutoComplete/issues/1009 by handling TaskCanceledException (as well as single-exception AggregateExceptions of the accepted types)

baronfel avatar Sep 05 '22 22:09 baronfel

this just might work IMHO, but I can't test this on my machine as fake does not build fsac for me on my shiny arm64 mac :(

you said me a couple of months ago how F# unwraps (or rather does not unwrap) AggregateException in try/with clause, but maybe this is unrelated.

we probably want to add test-suite for ionide.lsp ? this could help define behaviour of the lib maybe? what do you think?

razzmatazz avatar Sep 06 '22 04:09 razzmatazz

Tests are a good idea, I guess a test would be to make a dummy server with a long-running implementation (Async.Sleep ...) and then cancel it and verify that the overall server doesn't die?

baronfel avatar Sep 06 '22 13:09 baronfel

Tests are a good idea, I guess a test would be to make a dummy server with a long-running implementation (Async.Sleep ...) and then cancel it and verify that the overall server doesn't die?

sounds good, but we need to have testing framework here.. should we/I port one from FSAC or can we code it separately in ionide.LSP.

Btw, how does FSAC test the server–does it do the testing out-of-process and sends stuff via the entire STDIO/LSP stack or does it invoke the handlers directly?

razzmatazz avatar Sep 06 '22 18:09 razzmatazz