Conversation
|
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? |
|
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? |
| let rec (|HandleableException|_|) (e: exn) = | ||
| match e with | ||
| | :? LocalRpcException -> Some () | ||
| | :? TaskCanceledException -> Some () |
There was a problem hiding this comment.
if this change doesn't clash with the revamp branch, I also recommend catching OperationCanceledException
Potentially fix ionide/FsAutoComplete#1009 by handling TaskCanceledException (as well as single-exception AggregateExceptions of the accepted types)