Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-28598

LSP Error response from Client is not standard conform

    XMLWordPrintable

Details

    • c8e120123 (9.0)

    Description

      I have been trying my [lsp_server](https://crates.io/crates/lsp-server) language server with Qt Creator recently and I noticed that it errors out after a while

      This is the last message that Creator logged as having sent:

      18:55:57.863 Client
      {
          "error": {
              "code": -32601
          },
          "id": 0,
          "jsonrpc": "2.0"
      }
      

      Looking into the LSP specification, an `error` part of the reply should look like this:

      interface ResponseError {
          /**
          * A number indicating the error type that occurred.
          */
          code: integer;
      
          /**
          * A string providing a short description of the error.
          */
          message: string;
      
          /**
          * A primitive or structured value that contains additional
          * information about the error. Can be omitted.
          */
          data?: string | number | boolean | array | object | null;
      }
      

      I would expect Creator to send an message along with the error code.

      Sorry, I do not have a newer version of creator handy, but I checked Jira and did only find a similar report about haskel LSP not accepting an completely empty error reply (which was fixed).

      It would be cool if somebody could look into this: I am building on the standard library for LSPs in rust and expect them all to have similar problems as the Error bubbles up from the function reading stdio in that library.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            davschul David Schulz
            hunger Tobias Hunger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes