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

clangd overrides my compile_commands.json and crashes

    XMLWordPrintable

Details

    • Linux/X11
    • 19119b953395257bac345486a3ab10b9c5cf16c5 (qt-creator/qt-creator/6.0)

    Description

      I decided to try out the clangd-based C++ model after installing Creator 6 beta 1. Unfortunately, doing so deleted the compile_commands.json file of my compilation database project.

      And while clangd overwrites my compile_commands.json, the Creator UI constantly updates in response to the changes, and after a few seconds, Creator crashes.

      It seems like a very bad idea to have clangd create any files whatsoever outside the .cache directory that seems to be there for clangd use. As happens in this case, doing so runs the danger of overwriting user files that belong to the project.'

      As a side note, even a name like `.cache` seems too generic and prone to conflict. Perhaps it's a better idea to use something unique, like `.qtcreator-clangd-cache` instead.

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            realnc Nikos Chantziaras
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes