Skip to content
  • Duncan Coutts's avatar
    Fix an InstallPlan.failed assertion · 48a21cbf
    Duncan Coutts authored
    Remove the wrong assertion:
      all (`Set.notMember` failedSet)  (tail newlyFailedIds)
    
    This is wrong for much the same reasons as the part of the invariant
    (in the previous patch) was wrong.
    
    Suppose Q depends on P1 and P2 and the processing set intially is
    {P1, P2}. Now suppose that P1 fails, so the failure set becomes {P1,Q}
    and the new processing set is {P2}. Now suppose P2 also fails. Then the
    newlyFailedIds is [P2, Q] and so the tail is [Q]. Of couse Q is in the
    failure set already, in violation of the above assertion. But this is a
    perfectly reasonable scenario. It's just the assertion that is wrong.
    48a21cbf