Our language server is run by our darklang CLI runtime/executable, in a long-running function that's constantly consuming stdin and putting responses on stdout.
Generally this works great -- we get JSON blobs in, and put JSON blobs out.
However, we aren't currently handling failures very gracefully -- if there's a runtime exception, we end up printing that, which isn't json and thus causes the language server (and the extension which houses it) to fail/crash.
I imagine we'll support a darklang lsp command which will have special functionality for handling such failures gracefully.
Our language server is run by our
darklangCLI runtime/executable, in a long-running function that's constantly consuming stdin and putting responses on stdout.Generally this works great -- we get JSON blobs in, and put JSON blobs out.
However, we aren't currently handling failures very gracefully -- if there's a runtime exception, we end up printing that, which isn't json and thus causes the language server (and the extension which houses it) to fail/crash.
I imagine we'll support a
darklang lspcommand which will have special functionality for handling such failures gracefully.