Support for server->client batch requests? · Issue #781 · microsoft/vscode-languageserver-node · GitHub
Skip to content

Support for server->client batch requests? #781

Open

Description

@strager

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)?

Activity

  1. dbaeumer commented on Jun 25, 2021

    @dbaeumer
    Member

    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-rpc library.

    I do agree that request batching is very useful and I would like to find a solution for it for LSP.

  2. dbaeumer commented on Jun 25, 2021

    @dbaeumer
    Member

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestRequest for new features or functionality

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions