Description
If the graph is large, you may get the following error:
task: maximum task call exceeded (100) for task: probably an cyclic dep or infinite loop
The reasons are as follows:
Lines 110 to 112 in bf9cd76
So, if we try to execute the task >= 100 times, then we crash.
The issue is that RunTask
is executed once from each of the dependencies:
Lines 200 to 206 in bf9cd76
but we increment the counter before checking if the task is already running or finished. Such check is done below, in
startExecution
:Lines 300 to 327 in bf9cd76
So, if there is a task on which 100 other tasks depend, then the graph will fail with an error.
Moreover, if you read startExecution
carefully, then it would appear that the error has nothing to do with cyclic deps. The simplified algorithm is as follows:
RunTask(task) {
if (hashes.contains(task)) {
// wait for task
return;
}
hashes.insert(task);
// iterate over deps
// run commands
}
So, even for cyclic dependency, the task will be executed once (though, it will eventually stuck waiting for itself).
Metadata
Metadata
Assignees
Labels
No labels