Details
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
For Gerrit Dashboard: QBS-631 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
89976,3 | invalidate artifacts if a dependency is removed | master | qbs/qbs | Status: MERGED | +2 | 0 |
90074,3 | fix up-to-date check wrt missing file dependencies | master | qbs/qbs | Status: MERGED | +2 | 0 |