Uploaded image for project: 'Qt Design Studio'
  1. Qt Design Studio
  2. QDS-15636

cmake generator randomizes ordering in generated files, not git friendly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • QDS 4.7.1, QDS 4.7.2
    • CMake exporter
    • None
    • Linux/Wayland, Windows

    Description

      The CMake generator randomly orders the list of QML files in generated CMakeLists.txt files and linked libraries in qds.cmake. The generator runs frequently, such as when opening a project in QDS. This results in file changes despite nothing actually changing in the project and causes a lot of unnecessary merge conflicts in git.

      This makes parallel work by multiple developers extremely painful as just opening the project in QDS will result in changes to every generated cmake file. Each developer either has to manually revert changes to cmake files or deal with merge conflicts that are nothing but reordered file lists.

      I attached an example of this issue. It's a blank QDS starter project with no changes made. I added a git repo and made an initial commit with all files. Then I restarted QDS and opened the project. The repo now has uncommitted changes to the cmake files just from opening the project.

      A potentially straightforward fix would be to order everything alphabetically. Then the generator could run on the existing triggers but would always generate identical files, so there would no change as far as git is concerned.

      Attachments

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

        Activity

          People

            thohartm Thomas Hartmann
            msenter Mike Senter
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes