aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/buildgraph/executorjob.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove invalid assertion.Christian Kandeler2014-04-241-1/+2
| | | | | | | The asserted condition is actually not required to be true. Change-Id: I7609a8551e0c0906ebbb6649c5966ff1a90272fb Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Allow long-running commands to be canceled.Christian Kandeler2014-04-151-13/+6
| | | | | | | | | | At the moment, canceling a build waits for the current command to finish, which means that a badly behaving process or piece of JavaScript code can block qbs indefinitely. Task-number: QBS-552 Change-Id: I8ac23f068dd6083905a9681097da6b970c0b646b Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Sanitize error/finished handling in executor jobs and command executors.Christian Kandeler2014-04-151-20/+13
| | | | | | | | | | | | | | | | The classes as they are now specify different signals for signaling failure and finishing. Some of these error() signals are followed by a finished() signal, others are not, which is just asking for trouble. Under certain circumstances there can also be several error() signals for one and the same process. In fact, there is almost certainly a race condition there regarding executor job re-use. This patch changes the design so that there is always exactly one finished() signal that carries an error status. For some non-fatal problems that higher-level code cannot sensibly handle, we now log a warning instead of emitting an error signal. Change-Id: I9e3df11564e7337ad766ca0d009303367d43c4ec Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Do not report success from canceled jobs.Christian Kandeler2014-04-091-8/+21
| | | | | | | | | | | | | | | | | | | | | The current behavior leads to "interesting" problems. For example: - Consider a rule with two commands. - The associated transformer gets executed via an ExecutorJob. - Some other command in a different transformer fails, so the Executor calls cancel() on the ExecutorJob. Let's say this happens while the first command is running. - The ExecutorJob now waits for the first command to finish and then reports a successful finish to the Executor. This is the actual bug. - The Executor updates the timestamp for all artifacts to the current time, even though only one was actually written. - On the next run, the command is skipped, even though one artifact is not actually up to date. This patch makes sure that these timestamp updates do not happen for artifacts of transformers in canceled jobs, unless all commands were successfully run. Change-Id: Idccf3e7cc8fe67b7655cd032c70bf9f074400206 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* De-obfuscate Executor.Christian Kandeler2014-02-181-3/+5
| | | | | | | Transformers are what jobs work on, not artifacts. Change-Id: Ib267ec247dd6d165347511f0a0fdb3db00c58832 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* support transformers with an unknown number of outputsJoerg Bornemann2014-02-131-2/+2
| | | | | | | | | | | | | | | | 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>
* Move Qt profile setup into a dedicated library.Christian Kandeler2014-01-101-0/+156
Otherwise all changes to the implementation will have to be duplicated in IDEs. Change-Id: I61e6d4fa1ee9b724eb5d9de9f233dc915a6c8bc3 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>