Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-631

Build graph become inconsistent on renaming artifacts

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 1.3.0
    • 1.2.1
    • General
    • None
    • dce309bf4e18cc20f3f9b03fbd33f63f5c60d025 a451094914fe3df13d68e5c131014b82a71f7b50

    Description

      Assume you have a header file with declarations. After svn update, for example, file was renamed, but dependedt code does not changed. (not all refernces for old file removed from source).
      So that translation units have Reference to old name. It make annoyance to introduce binary compatibility break (random crashes etc), curing by clen/rebuild.

      i think with qbs we shouldn't do "clean" in ideal.

      Steps to reproduce:
      1 get example progect
      2. compile.
      3. rename "lib.h" to "lib2.h" and replace #include in "lib.cpp"
      in "main.cpp" leave "lib.h". Uncomment adding third argument.
      4. Compile. See "unresolved external error"
      EXPECTED:
      qbs see that "lib.h" is non-present, recompile "main.cpp" and show simple compile error.

      I think it is just the same bug, but another steps (I also have this problem in real project):
      all sources are correct (contrast to previous).
      1. You have "lib.h" and "lib.cpp" in folder "lib1/" which is placed in includePaths property. Also we have "lib2/" folder which is empty.
      2. then we move "lib.h" and "lib.cpp" to folder "lib2/" AND change signatures. (this is common refactoring action! suppose we updated from svn and one class moved).
      3. Reparse Qbs. build. "lib.cpp" WILL rebuild, "main.cpp" obvously not.
      Got unresolved external again.
      EXPECTED: just as previous. #include <lib.h> is correct include, but location of "lib.h" changed. Build graph depends on old file.

      Attachments

        1. bug.qbs
          0.1 kB
        2. hello.zip
          5 kB
        3. lib.cpp
          0.2 kB
        4. lib.h
          0.1 kB
        5. main.cpp
          0.1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jbornema Joerg Bornemann
            mapron Smirnov Vladimir
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes