aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2014-07-31 15:59:56 +0200
committerChristian Kandeler <christian.kandeler@digia.com>2014-08-01 11:52:57 +0200
commit02ada61b491cc9214b42e27789e733e31f73b7ab (patch)
tree9a06dbec30704166f72e40f11d1894cd3ded03a3 /src
parentbd172083e9b4367aa712b7c4314bff379e6e96ee (diff)
multiplex rules now always see all inputs
Multiplex rules now always see all inputs they're interested in and not only the compatible inputs that are out of date. Also, we do not need to re-use transformers, because that's a fruitless optimization attempt that complicated the code. Eventually, we're able to remove the hard-to-grasp "regenerating transformer" block. Task-number: QBS-645 Change-Id: I86dd307ee6ffa95baddd4e49307f0c1816e29901 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/lib/corelib/buildgraph/rulenode.cpp9
-rw-r--r--src/lib/corelib/buildgraph/rulesapplicator.cpp12
2 files changed, 6 insertions, 15 deletions
diff --git a/src/lib/corelib/buildgraph/rulenode.cpp b/src/lib/corelib/buildgraph/rulenode.cpp
index eaccf3c6f..a5d79353d 100644
--- a/src/lib/corelib/buildgraph/rulenode.cpp
+++ b/src/lib/corelib/buildgraph/rulenode.cpp
@@ -88,10 +88,13 @@ void RuleNode::apply(const Logger &logger, const ArtifactSet &changedInputs,
product->unmarkForReapplication(m_rule);
if (logger.traceEnabled())
logger.qbsTrace() << "[BG] rule is marked for reapplication " << m_rule->toString();
- inputs += allCompatibleInputs;
- } else {
- inputs += addedInputs;
}
+
+ if (m_rule->multiplex)
+ inputs = allCompatibleInputs;
+ else
+ inputs += addedInputs;
+
if (result->upToDate)
return;
if (!removedInputs.isEmpty()) {
diff --git a/src/lib/corelib/buildgraph/rulesapplicator.cpp b/src/lib/corelib/buildgraph/rulesapplicator.cpp
index 86599a136..7c97e2d99 100644
--- a/src/lib/corelib/buildgraph/rulesapplicator.cpp
+++ b/src/lib/corelib/buildgraph/rulesapplicator.cpp
@@ -315,18 +315,6 @@ Artifact *RulesApplicator::createOutputArtifact(const QString &filePath, const F
throw ErrorInfo(e);
}
- if (outputArtifact->transformer && outputArtifact->transformer != m_transformer) {
- QBS_CHECK(!m_transformer);
-
- // This can happen when applying rules after scanning for additional file tags.
- // We just regenerate the transformer.
- if (m_logger.traceEnabled()) {
- m_logger.qbsTrace() << QString::fromLocal8Bit("[BG] regenerating transformer "
- "for '%1'").arg(relativeArtifactFileName(outputArtifact));
- }
- m_transformer = outputArtifact->transformer;
- m_transformer->inputs.unite(inputArtifacts);
- }
outputArtifact->clearTimestamp();
} else {
outputArtifact = new Artifact;