File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -367,6 +367,25 @@ impl<DP: DependencyProvider> PartialSolution<DP> {
367367 None
368368 }
369369
370+ /// Manually update a package priority that changed independent of the range.
371+ pub fn update_priority ( & mut self , package : Id < DP :: P > , priority : DP :: Priority ) {
372+ if self
373+ . package_assignments
374+ . get ( & package)
375+ . and_then ( |assignment| {
376+ assignment
377+ . assignments_intersection
378+ . potential_package_filter ( )
379+ } )
380+ . is_none ( )
381+ {
382+ // Only prioritize packages up for decision
383+ return ;
384+ }
385+ self . prioritized_potential_packages
386+ . push ( package, ( priority, Reverse ( package. into_raw ( ) as u32 ) ) ) ;
387+ }
388+
370389 /// If a partial solution has, for every positive derivation,
371390 /// a corresponding decision that satisfies that assignment,
372391 /// it's a total solution and version solving has succeeded.
You can’t perform that action at this time.
0 commit comments