Skip to content

Commit

Permalink
Add method to return undecided packages (#37)
Browse files Browse the repository at this point in the history
This is used in uv for logging
  • Loading branch information
konstin committed Dec 20, 2024
1 parent 3046bc0 commit d130d12
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/internal/partial_solution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,21 @@ impl<DP: DependencyProvider> PartialSolution<DP> {
self.next_global_index += 1;
}

/// The list of package that have not been selected after the last prioritization.
///
/// This list gets updated by [`Self::pick_highest_priority_pkg`] and cleared by backtracking.
#[allow(clippy::type_complexity)]
pub fn undecided_packages(
&self,
) -> impl Iterator<
Item = (
&Id<DP::P>,
&(<DP as DependencyProvider>::Priority, Reverse<u32>),
),
> {
self.prioritized_potential_packages.iter()
}

/// Add a derivation.
pub(crate) fn add_derivation(
&mut self,
Expand Down

0 comments on commit d130d12

Please sign in to comment.