You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JSON-RPC version 2.0 defines batch requests, where a JSON-RPC client can send multiple requests (including notifications) in one transport message: https://www.jsonrpc.org/specification#batch
My LSP server sends batch requests, but vscode-lspclient seems to ignore these batch requests. From my interpretation of the LSP specification and the JSON-RPC specification, vscode-lspclient's behavior is non-conforming.
Is vscode-lspclient supposed to be conforming to the JSON-RPC version 2.0 specification? Or does vscode-lspclient only support JSON-RPC version 1.0 (which does not have batch requests)?
The text was updated successfully, but these errors were encountered:
strager
added a commit
to quick-lint/quick-lint-js
that referenced
this issue
Jun 25, 2021
As of vscode-jsonrpc version 6.0.0, Visual Studio Code's LSP client does
not support batch JSON-RPC messages [1]. I suspect other LSP clients
also don't support batch messages.
quick-lint-js' LSP server emits batch messages when a config file
changes. Visual Studio Code's LSP client ignores these messages, making
our vscode-lsp extension feel buggy.
Change our LSP server to only emit batch messages if it receives a batch
request.
For JSON-RPC-compliant LSP clients, this commit should not change
behavior.
[1] microsoft/vscode-languageserver-node#781
When we did a initial investigation we noticed that quite some json rpc libraries don't have support for batch requests. This is why we stayed away from it in the LSP protocol and hence I never implemented it in the vscode json-rpc library.
I do agree that request batching is very useful and I would like to find a solution for it for LSP.
And to answer your questions: the library is currently 2.0 - batch requests. Adding it on the library level is fine for me, but we would still need to decide how to surface this on the protocol level to not break things
JSON-RPC version 2.0 defines batch requests, where a JSON-RPC client can send multiple requests (including notifications) in one transport message: https://www.jsonrpc.org/specification#batch
My LSP server sends batch requests, but vscode-lspclient seems to ignore these batch requests. From my interpretation of the LSP specification and the JSON-RPC specification, vscode-lspclient's behavior is non-conforming.
Is vscode-lspclient supposed to be conforming to the JSON-RPC version 2.0 specification? Or does vscode-lspclient only support JSON-RPC version 1.0 (which does not have batch requests)?
The text was updated successfully, but these errors were encountered: