aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/buildgraph/depscanner.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2017-11-02 16:10:38 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2017-11-10 10:01:20 +0000
commit4ede42b26d871b1571c0aba6c2b3cc54249356f5 (patch)
treec6c70038b945da681c8c533bb3c5943a0c3fd42e /src/lib/corelib/buildgraph/depscanner.cpp
parent2530d46c5a8a9dfba6e02b48a376545cdaf7a361 (diff)
Better change tracking for imported JS files
We did both too much and too little: Firstly, we invalidated all rules that appeared in a file that imported a changed JS file, independent of whether that import was relevant to the rule. Secondly, we did not catch changes to recursively imported files at all. Now we track accesses to functions in imports and invalidate a rule or command only if a file to which such an access refers has been modified. More fine-grained checks (e.g. per function) would be possible, but incur more overhead, as we'd have to store the respective source code in the build graph. Change-Id: I95f62d233bf87d2c39abbe37056a8fe434f20b5a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/lib/corelib/buildgraph/depscanner.cpp')
-rw-r--r--src/lib/corelib/buildgraph/depscanner.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/corelib/buildgraph/depscanner.cpp b/src/lib/corelib/buildgraph/depscanner.cpp
index 09a7b6296..00a8290de 100644
--- a/src/lib/corelib/buildgraph/depscanner.cpp
+++ b/src/lib/corelib/buildgraph/depscanner.cpp
@@ -156,12 +156,13 @@ UserDependencyScanner::UserDependencyScanner(const ResolvedScannerConstPtr &scan
ScriptEngine *engine)
: m_scanner(scanner),
m_engine(engine),
- m_observer(m_engine),
+ m_observer(m_engine, UnobserveMode::Enabled),
m_product(0)
{
m_global = m_engine->newObject();
m_global.setPrototype(m_engine->globalObject());
- setupScriptEngineForFile(m_engine, m_scanner->scanScript->fileContext, m_global);
+ setupScriptEngineForFile(m_engine, m_scanner->scanScript->fileContext, m_global,
+ ObserveMode::Disabled); // TODO: QBS-1092
}
QStringList UserDependencyScanner::collectSearchPaths(Artifact *artifact)