@@ -855,7 +855,7 @@ impl RemainingCandidates {
855
855
}
856
856
}
857
857
858
- /// Attempts to find a new conflict that allows a bigger backjump then the input one.
858
+ /// Attempts to find a new conflict that allows a `find_candidate` feather then the input one.
859
859
/// It will add the new conflict to the cache if one is found.
860
860
///
861
861
/// Panics if the input conflict is not all active in `cx`.
@@ -871,28 +871,28 @@ fn generalize_conflicting(
871
871
return None ;
872
872
}
873
873
// We need to determine the `ContextAge` that this `conflicting_activations` will jump to, and why.
874
- let ( jumpback_critical_age , jumpback_critical_id ) = conflicting_activations
874
+ let ( backtrack_critical_age , backtrack_critical_id ) = conflicting_activations
875
875
. keys ( )
876
876
. map ( |& c| ( cx. is_active ( c) . expect ( "not currently active!?" ) , c) )
877
877
. max ( )
878
878
. unwrap ( ) ;
879
- let jumpback_critical_reason : ConflictReason =
880
- conflicting_activations[ & jumpback_critical_id ] . clone ( ) ;
879
+ let backtrack_critical_reason : ConflictReason =
880
+ conflicting_activations[ & backtrack_critical_id ] . clone ( ) ;
881
881
882
882
if cx
883
883
. parents
884
- . is_path_from_to ( & parent. package_id ( ) , & jumpback_critical_id )
884
+ . is_path_from_to ( & parent. package_id ( ) , & backtrack_critical_id )
885
885
{
886
886
// We are a descendant of the trigger of the problem.
887
887
// The best generalization of this is to let things bubble up
888
- // and let `jumpback_critical_id ` figure this out.
888
+ // and let `backtrack_critical_id ` figure this out.
889
889
return None ;
890
890
}
891
891
// What parents does that critical activation have
892
892
for ( critical_parent, critical_parents_deps) in
893
- cx. parents . edges ( & jumpback_critical_id ) . filter ( |( p, _) | {
893
+ cx. parents . edges ( & backtrack_critical_id ) . filter ( |( p, _) | {
894
894
// it will only help backjump further if it is older then the critical_age
895
- cx. is_active ( * p) . expect ( "parent not currently active!?" ) < jumpback_critical_age
895
+ cx. is_active ( * p) . expect ( "parent not currently active!?" ) < backtrack_critical_age
896
896
} )
897
897
{
898
898
for critical_parents_dep in critical_parents_deps. iter ( ) {
@@ -906,14 +906,17 @@ fn generalize_conflicting(
906
906
. rev ( ) // the last one to be tried is the least likely to be in the cache, so start with that.
907
907
. all ( |other| {
908
908
let mut con = conflicting_activations. clone ( ) ;
909
- con. remove ( & jumpback_critical_id) ;
910
- con. insert ( other. summary . package_id ( ) , jumpback_critical_reason. clone ( ) ) ;
909
+ con. remove ( & backtrack_critical_id) ;
910
+ con. insert (
911
+ other. summary . package_id ( ) ,
912
+ backtrack_critical_reason. clone ( ) ,
913
+ ) ;
911
914
past_conflicting_activations. contains ( & dep, & con)
912
915
} )
913
916
{
914
917
let mut con = conflicting_activations. clone ( ) ;
915
- con. remove ( & jumpback_critical_id ) ;
916
- con. insert ( * critical_parent, jumpback_critical_reason ) ;
918
+ con. remove ( & backtrack_critical_id ) ;
919
+ con. insert ( * critical_parent, backtrack_critical_reason ) ;
917
920
past_conflicting_activations. insert ( & dep, & con) ;
918
921
return Some ( con) ;
919
922
}
0 commit comments