diff options
author | Christian Kandeler <christian.kandeler@digia.com> | 2014-04-08 16:23:26 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@digia.com> | 2014-04-09 14:29:58 +0200 |
commit | 873366e9abbba5e1bab72c7b10a6ce64a5f29927 (patch) | |
tree | b56ef3f9947fe1dce7849d15197a45d0e04e8f45 /src/lib/corelib/buildgraph/executorjob.h | |
parent | ad89466f3e5e4c37779fbb2d5fbf284b4f5bc3b2 (diff) |
Do not report success from canceled jobs.
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>
Diffstat (limited to 'src/lib/corelib/buildgraph/executorjob.h')
-rw-r--r-- | src/lib/corelib/buildgraph/executorjob.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/corelib/buildgraph/executorjob.h b/src/lib/corelib/buildgraph/executorjob.h index 339b1f82a..dee7080b8 100644 --- a/src/lib/corelib/buildgraph/executorjob.h +++ b/src/lib/corelib/buildgraph/executorjob.h @@ -73,13 +73,15 @@ private slots: void onCommandFinished(); private: - void setInactive(); + void setFinished(); + void reset(); AbstractCommandExecutor *m_currentCommandExecutor; ProcessCommandExecutor *m_processCommandExecutor; JsCommandExecutor *m_jsCommandExecutor; Transformer *m_transformer; int m_currentCommandIdx; + ErrorInfo m_error; }; } // namespace Internal |