@@ -208,34 +208,38 @@ impl<DP: DependencyProvider> State<DP> {
208
208
. is_terminal ( self . root_package , & self . root_version )
209
209
{
210
210
return Err ( current_incompat_id) ;
211
- } else {
212
- let ( package, satisfier_search_result) = self . partial_solution . satisfier_search (
213
- & self . incompatibility_store [ current_incompat_id] ,
214
- & self . incompatibility_store ,
215
- ) ;
216
- match satisfier_search_result {
217
- SatisfierSearch :: DifferentDecisionLevels {
211
+ }
212
+ let ( package, satisfier_search_result) = self . partial_solution . satisfier_search (
213
+ & self . incompatibility_store [ current_incompat_id] ,
214
+ & self . incompatibility_store ,
215
+ ) ;
216
+ match satisfier_search_result {
217
+ SatisfierSearch :: DifferentDecisionLevels {
218
+ previous_satisfier_level,
219
+ } => {
220
+ self . backtrack (
221
+ current_incompat_id,
222
+ current_incompat_changed,
218
223
previous_satisfier_level,
219
- } => {
220
- self . backtrack (
221
- current_incompat_id,
222
- current_incompat_changed,
223
- previous_satisfier_level,
224
- ) ;
225
- log:: info!( "backtrack to {:?}" , previous_satisfier_level) ;
226
- return Ok ( ( package, current_incompat_id) ) ;
227
- }
228
- SatisfierSearch :: SameDecisionLevels { satisfier_cause } => {
229
- let prior_cause = Incompatibility :: prior_cause (
230
- current_incompat_id,
231
- satisfier_cause,
232
- package,
233
- & self . incompatibility_store ,
234
- ) ;
235
- log:: info!( "prior cause: {}" , prior_cause. display( & self . package_store) ) ;
236
- current_incompat_id = self . incompatibility_store . alloc ( prior_cause) ;
237
- current_incompat_changed = true ;
224
+ ) ;
225
+ log:: info!( "backtrack to {:?}" , previous_satisfier_level) ;
226
+ return Ok ( ( package, current_incompat_id) ) ;
227
+ }
228
+ SatisfierSearch :: SameDecisionLevels { satisfier_cause } => {
229
+ let prior_cause = Incompatibility :: prior_cause (
230
+ current_incompat_id,
231
+ satisfier_cause,
232
+ package,
233
+ & self . incompatibility_store ,
234
+ ) ;
235
+
236
+ for ( p, _) in prior_cause. iter ( ) {
237
+ * self . conflict_count . entry ( p) . or_default ( ) += 1 ;
238
238
}
239
+
240
+ log:: info!( "prior cause: {}" , prior_cause. display( & self . package_store) ) ;
241
+ current_incompat_id = self . incompatibility_store . alloc ( prior_cause) ;
242
+ current_incompat_changed = true ;
239
243
}
240
244
}
241
245
}
0 commit comments