Skip to content

Commit

Permalink
DerivationGoal: only retry if output closure incomplete is only problem
Browse files Browse the repository at this point in the history
  • Loading branch information
roberth committed Oct 18, 2020
1 parent ea8d320 commit bd9eb5c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/libstore/build/derivation-goal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,13 @@ void DerivationGoal::outputsSubstitutionTried()

/* If the substitutes form an incomplete closure, then we should
build the dependencies of this derivation, but after that, we
can still use the substitutes for this derivation itself. */
if (nrIncompleteClosure > 0) retrySubstitution = true;
can still use the substitutes for this derivation itself.
If the nrIncompleteClosure != nrFailed, we have another issue as well.
In particular, it may be the case that the hole in the closure is
an output of the current derivation, which causes a loop if retried.
*/
if (nrIncompleteClosure > 0 && nrIncompleteClosure == nrFailed) retrySubstitution = true;

nrFailed = nrNoSubstituters = nrIncompleteClosure = 0;

Expand Down

0 comments on commit bd9eb5c

Please sign in to comment.