Fix starting first build action
* Prevent endless recursion * Consider starting parallel sequence also as having started an action to prevent starting also actions which should only start after that parallel sequence
This commit is contained in:
parent
80c99cb179
commit
8e904ebfbf
|
@ -405,9 +405,11 @@ static std::vector<std::shared_ptr<BuildAction>> allocateBuildActionIDs(ServiceS
|
|||
|
||||
static bool startFirstBuildActions(ServiceSetup &setup, SequencedBuildActions &newActionSequence)
|
||||
{
|
||||
auto handledFirstAction = false;
|
||||
for (auto &sequencedAction : newActionSequence.actions) {
|
||||
if (auto *const maybeAction = std::get_if<std::shared_ptr<BuildAction>>(&sequencedAction)) {
|
||||
auto &action = *maybeAction;
|
||||
handledFirstAction = true;
|
||||
if (action->isScheduled()) {
|
||||
action->start(setup);
|
||||
}
|
||||
|
@ -415,12 +417,12 @@ static bool startFirstBuildActions(ServiceSetup &setup, SequencedBuildActions &n
|
|||
return true;
|
||||
}
|
||||
} else if (auto *const subSequence = std::get_if<SequencedBuildActions>(&sequencedAction)) {
|
||||
if (startFirstBuildActions(setup, newActionSequence) && !newActionSequence.concurrent) {
|
||||
if (startFirstBuildActions(setup, *subSequence) && !newActionSequence.concurrent) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return handledFirstAction;
|
||||
}
|
||||
|
||||
void postBuildActionsFromTask(const Params ¶ms, ResponseHandler &&handler, const std::string &taskName, const std::string &directory,
|
||||
|
|
Loading…
Reference in New Issue