Details
Description
Consider this:
import qbs CppApplication { files: ["fine.cpp", "broken.cpp"] }
Now try to build:
# qbs build -k
Output is:
compiling broken.cpp compiling fine.cpp WARNING: Ignoring the following errors on user request:
Where the error message mentions that broken.cpp cannot be compiled.
Now running qbs again should not print "compiling fine.cpp", but it does. Debugging shows that fine.cpp.o correctly gets a new timestamp during the first build, but in the second one it is cleared again in RulesApplicator::createOutputArtifact(), where the (misleading) debug message "regenerating transformer" is printed. Apparently this function and its calling code disagree about what it means when the function is called with a file path for which an artifact already exists. The function itself believes this means the artifact has become invalid, whereas the calling code does not seem to make that assumption. And again, the weird check for "outputArtifact->transformer != m_transformer" plays a role. Note that this condition is always true for the first call to the function...