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)?
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
Activity
LSP: work around buggy clients; avoid batch messages
dbaeumer commentedon Jun 25, 2021
strager (@strager) there is an item in the protocol itself on how batch requests should be supported. See microsoft/language-server-protocol#988
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-rpclibrary.I do agree that request batching is very useful and I would like to find a solution for it for LSP.
dbaeumer commentedon Jun 25, 2021
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