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

Re-highlighting sometimes fails with clangd

    XMLWordPrintable

Details

    • 9fea2af1e9 (qt-creator/qt-creator/master) 9fea2af1e9 (qt-creator/qt-creator/qmlprojectstorage)

    Description

      After doing some editing, the highlighting procedure is sometimes not re-run, resulting e.g. in new code staying un-highlighted. Sometimes only new code is affected, sometimes the entire file loses its existing highlighting as well. Example log output for an occurrence of the first case:

      qtc.clangcodemodel.clangd.timing: highlighting: starting
      qtc.clangcodemodel.clangd.timing: highlighting: subtask started at Fri Nov 26 12:22:01 2021
      qtc.clangcodemodel.clangd.highlight: LSP tokens outdated; aborting highlighting procedure 60 62
      qtc.clangcodemodel.clangd.timing: highlighting: subtask stopped at Fri Nov 26 12:22:01 2021
      qtc.clangcodemodel.clangd.timing: highlighting: subtask started at Fri Nov 26 12:22:04 2021
      qtc.clangcodemodel.clangd.highlight: LSP tokens outdated; aborting highlighting procedure 66 67
      qtc.clangcodemodel.clangd.timing: highlighting: subtask stopped at Fri Nov 26 12:22:04 2021
      

      Either there's something off with our versioning, or we are failing to request new highlighting, or clangd does not send it.
      For the example above, a timestamp comparison with the language inspector seems to indicate that a new semanticTokens message was received after the quoted log output, but if that is so, then it was apparently not forwarded to the clangd-specific client code.

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            kandeler Christian Kandeler
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes