summaryrefslogtreecommitdiff
path: root/src/lib/buildgraph/buildgraphloader.h
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2013-08-13 12:13:33 +0200
committerJoerg Bornemann <joerg.bornemann@digia.com>2013-08-14 15:27:31 +0200
commit594471f4af81b2fea86c789f6b905314d2cb2125 (patch)
tree4d9a5116a14f3a35068892010be880e623c86546 /src/lib/buildgraph/buildgraphloader.h
parentec9f0d7b949f27cff68e255c65b5d301f27851ad (diff)
downloadqbs-594471f4af81b2fea86c789f6b905314d2cb2125.tar.gz
Better handling of property changes when restoring a build graph.
If a property change is discovered in any given product, the current code throws away the whole build graph, generates a new one and then re- inserts selected data from the old one. With this patch, we only regenerate the build data of the affected product (and still re-insert some existing data into it as to not rebuild artifacts that are up to date). Change-Id: I49e475c66dfb84ad20253ab53daf25acfe5a738b Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/lib/buildgraph/buildgraphloader.h')
-rw-r--r--src/lib/buildgraph/buildgraphloader.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/lib/buildgraph/buildgraphloader.h b/src/lib/buildgraph/buildgraphloader.h
index 0c6f1d5fe..3086a0217 100644
--- a/src/lib/buildgraph/buildgraphloader.h
+++ b/src/lib/buildgraph/buildgraphloader.h
@@ -47,11 +47,8 @@ class FileTime;
class BuildGraphLoadResult
{
public:
- BuildGraphLoadResult() : discardLoadedProject(false) {}
-
TopLevelProjectPtr newlyResolvedProject;
TopLevelProjectPtr loadedProject;
- bool discardLoadedProject;
};
@@ -81,7 +78,10 @@ private:
QList<ResolvedProductPtr> &productsWithChangedFiles);
bool checkProductForChanges(const ResolvedProductPtr &restoredProduct,
const ResolvedProductPtr &newlyResolvedProduct);
- void onProductRemoved(const ResolvedProductPtr &product, ProjectBuildData *projectBuildData);
+ bool checkForPropertyChanges(const ResolvedProductPtr &restoredProduct,
+ const ResolvedProductPtr &newlyResolvedProduct);
+ void onProductRemoved(const ResolvedProductPtr &product, ProjectBuildData *projectBuildData,
+ bool removeArtifactsFromDisk = true);
void onProductFileListChanged(const ResolvedProductPtr &product,
const ResolvedProductPtr &changedProduct);
void removeArtifactAndExclusiveDependents(Artifact *artifact,
@@ -89,6 +89,9 @@ private:
bool checkForPropertyChanges(const TransformerPtr &restoredTrafo, const ResolvedProductPtr &freshProduct);
void replaceFileDependencyWithArtifact(const ResolvedProductPtr &fileDepProduct,
FileDependency *filedep, Artifact *artifact);
+ void rescueOldBuildData(const ResolvedProductConstPtr &restoredProduct,
+ const ResolvedProductPtr &newlyResolvedProduct,
+ const ProjectBuildData *oldBuildData);
RulesEvaluationContextPtr m_evalContext;
BuildGraphLoadResult m_result;