| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Missing override is a warning in clang
Change-Id: I90b899df37e690aebb942bffc65db54d9aa4050f
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
|
| |
... rather than after the prepare script has run. This gives a more
realistic estimate on average.
Fixes: QTCREATORBUG-18523
Change-Id: I61214903936f964e060b92238d5644f0a8414539
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
|
|
| |
When we introduced our "dummy artifact" singleton, we forgot that it
gets stored and consequently needs to get deallocated manually in
subsequent qbs invocations. Let's use a null pointer instead.
Change-Id: If19c6faa46cfcba60e24c84bfd095ade94546dbb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
|
|
|
|
|
|
| |
Add overrides to function, except for destructors.
Change-Id: I1a1337b01dfef81b74ba56c5f00bf4d4cfc10935
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Namely, explicitlyDependsOn and auxiliaryInputs. A change in the set of
explicitlyDependsOn must cause rule re-application (see c241048e30).
In addition, for "I/O rules" (see 2d1de8cc84), we re-apply on filestamp
changes to explicitlyDependsOn and any changes to auxiliaryInputs.
Change-Id: Ic1770ab37b0609b0d58e7bbc6c1c755dec262a19
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After removing generated artifacts, we check whether the respective
parent directory is now empty, and if it is, we remove it to keep the
build directory tidy.
However, we cannot do that right away as part of rule application,
because concurrently running processes of other rules might access that
directory. Therefore, we delay the directory removal step until the
Executor has finished.
Change-Id: If996e231aa34bc487bcd179d8fc7f49678519b00
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The old code had a number of problems:
- It partially overlapped with the calculation of compatible inputs.
- It was wrong in that it failed to consider inputs from dependencies.
- It was wrong in that it assumed that after rule application, input
artifacts always have parent artifacts to later compare timestamps with.
This is not the case for e.g. a generated cpp file without a Q_OBJECT
macro on which moc is run: No transformer is created in such a case,
because the outputArtifacts array is empty.
The last problem was glossed over by the fact that we held a global list
of "changed source artifacts" in the executor, so such changes were
spotted when they happened in source artifacts. However, that code was
also rather dubious in itself because the criterion for "changed" was
that the timestamp was newer than it was on the last run of the
executor, so I don't think it was completely safe when doing partial
builds.
We solve these problems by remembering when we last applied the rule. An
input artifact is considered "changed" if it has been modified after
that.
Change-Id: Ib1bafd9e1078122776626155c4f2cc11ad622191
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
| |
Having all the related code in one place makes it much easier to
understand what is going on, and the Executor code is completely
straightforward now.
Change-Id: I0c8b2d0edafa69ad326f6afbb0ab1202fef9d885
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
| |
The naming of these sets and the code that handled them in the Executor
suggested that they could contain other types of nodes as well.
Change-Id: I6443f07a3615eff166965a5203002797200924b0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Only a small minority of rules determines their outputs based on the
content of their inputs. In order to do that, they need to do file I/O
in their outputArtifacts scripts, for instance via qbs.TextFile or
qbs.Process. All rules that don't do that do not need to get re-applied
if an input changes.
Change-Id: Icc713a54de4f60b3ef5dca523da5bfe42cc7e176
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If an artifact goes away, it is removed from the "old inputs" list of
rule nodes, because obviously we cannot reference invalid pointers
there. However, we do need to remember that there was something there,
because otherwise we will not re-apply the rule even though we have to.
For this purpose, we replace the disappeared artifact with a dummy. This
one will never appear as an input and thus its presence will cause re-
application of the rule.
Change-Id: I060db19b85ab5749ba768a7dd0a37b588cde63a7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
| |
The information about which input artifacts changed is only relevant to
the code in RuleNode, so let's set it up there.
Change-Id: I4be762f91583a77f083b26abb5882c60cb6ead86
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
It's silly that we have to mention each serializable data member in
both the load and the store methods.
Instead, whenever possible, forward these methods to a template that calls
the right function in the persistence backend based on its parameter.
Change-Id: I00e2dee8cdf55405f447cee27190bc97df8673e3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The checks that determine whether to re-run prepare scripts and/or
commands due to property or environment changes do not belong into the
build graph loader. Instead, we now do them on demand during the build
process. Advantages:
- The code is at its "natural" place, making it easier to understand
and less fragile.
- There are a lot fewer unnecessary build data invalidations, speeding
up both re-resolving and rebuilding in case only some rules/commands
have changed.
- Re-running commands due to property or environment changes no longer
implies re-running prepare scripts.
- We now catch property changes on generated artifacts, which was not
possible before, because the build graph loader only had access to
the source artifacts of the re-resolved project.
Change-Id: I36b022cf631fa9e8293feec4d6f416c2686539c1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
| |
This speeds up rule execution by another 2%.
Change-Id: If819144f2c01bd243ec98f7a6d050bc5faa2b02c
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our serialization requirements are fully served by the template
mechanism; there is no need to put an inheritance-based approach on top
of it.
Now there is no more virtual inheritance, which allowed us to get rid of
one more dynamic_cast. According to our benchmarker, build graph loading
has become about 3% faster.
Change-Id: If2f5080f74a0ef972a575ac2798f9d94a7f3b519
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
========== Performance data for Resolving ==========
Old instruction count: 2324724447
New instruction count: 2317712921
Relative change: -1 %
Old peak memory usage: 21411584 Bytes
New peak memory usage: 21070552 Bytes
Relative change: -2 %
========== Performance data for Rule Execution ==========
Old instruction count: 4231322611
New instruction count: 4246208129
Relative change: +0 %
Old peak memory usage: 19239000 Bytes
New peak memory usage: 18181072 Bytes
Relative change: -6 %
========== Performance data for Null Build ==========
Old instruction count: 542161499
New instruction count: 505511534
Relative change: -7 %
Old peak memory usage: 13599040 Bytes
New peak memory usage: 11892952 Bytes
Relative change: -13 %
Change-Id: I36b3dbd3fd2a4bc7503ee7779d31bd0217000785
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Patch-set 1 includes *.h
Every source file needs to have up-to-date license
headers in order to pass ci.
Change-Id: Ib6cf3ac47dfba6dff262fded44bc952aef3bda8b
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
|
|
|
|
|
|
| |
Change-Id: I885d94bb14b325dc36767a840ebdb0be1fb59dd2
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
| |
Change-Id: I36d825db3a5ef32c162c3063aab1e8a1f2696f4f
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I092fca9f950de1ba38826c33b155f86feae2770b
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
Artifacts that get invalidated by rules must be considered as source
for new leaves in the executor.
Task-number: QBS-723
Change-Id: I6a6f40725103f1f4a917d3e71f968dc355f8a763
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
|
|
|
|
|
|
|
| |
Add LGPLv3 option.
Change-Id: I8a63ad5e46a2701032b2103f791df4dec5b707e8
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of deducing the old inputs of a rule from the inputs of its
created transformers, we hold a dedicated list of old inputs, because
the former approach doesn't work for dynamic rules.
This fixes a speed regression introduced in 32c4d3d7.
The outputArtifacts script of dynamic rules was always run on
compatible inputs that were not input of transformers, e.g.
C++ sources that don't have a Q_OBJECT macro.
Change-Id: I2d43fa7c91ed9084bd27dc9b948c06152bfce726
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
We kept lists of added and removed artifacts in ProductBuildData. It was
never quite clear when to invalidate those lists, which led to QBS-635.
Instead we let the RuleNode decide which artifacts it considers as
"added or removed for this rule".
Task-number: QBS-635
Change-Id: I390e0ab775c695045c6e91ade3ac7326692cb314
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
|
|
|
|
|
|
|
|
|
| |
This enables compound products that do not provide their own source
files but only consist of dependencies.
Task-number: QBS-277
Change-Id: I8e3fc5b5e3a85ca2c6fe4890dcd52d3a55cebfe2
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
|
|
|
|
|
|
|
|
| |
Remove unused function and merge functions that were (nearly) doing the
same thing.
Change-Id: I33276068d5595456832ed44a0ff2d5705a87165a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
|
|
To support different types of nodes in the build graph, we introduce
the base class BuildGraphNode. Artifact now derives from BuildGraphNode.
A RuleNode class is introduced that represents a rule in the build graph.
Rules are applied in the build phase and not in a pre-build phase
anymore.
The handling of moc has been revisited. The fixed automoc pre-build
phase is no more.
This is the squashed merge of a feature branch.
Task-number: QBS-370
Change-Id: If27cdc51cba8c9542e4282c2caa456faa723aeff
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
|