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

Missing rangeLength member in language client didChange message

    XMLWordPrintable

    Details

    • Platform/s:
      macOS
    • Commits:
      c65e480cbd9511b0641d9fdc46c86694767b3a87 (qt-creator/qt-creator/4.10)

      Description

      The redundant but mandated field rangeLength is absent from (some?) didChange messages. The current specification of didChange says "If range and rangeLength are omitted the new text is considered to be the full content of the document." (my emphasis), i.e. it is not allowed to specify just the range.

      This may break some language servers that expect the mandated rangeLength member to be present.

      See this ticket that discuss the redundancy of the rangeLength member and the fact that it is currently obligatory (unless the range member is also absent).

      qtc.languageclient.messages: StdIOClient send data:
      qtc.languageclient.messages: Content-Length: 256
      
      {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":19,"line":9},"start":{"character":19,"line":9}},"text":"\n        "}],"textDocument":{"uri":"file:///Users/perm/MyQtProject/blipp.pl","version":2}}}
      
      

        Attachments

        For Gerrit Dashboard: QTCREATORBUG-22694
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            davschul David Schulz
            Reporter:
            per.mildner Per Mildner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes