Skip to content

Commit

Permalink
Allow access to undecided packages
Browse files Browse the repository at this point in the history
Allow introspecting which packages are to be decided. uv currently uses this for (trace) logging in the resolver.
  • Loading branch information
konstin committed Dec 16, 2024
1 parent 3624c3b commit 59659de
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/internal/partial_solution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,13 @@ 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.
pub fn undecided_packages(&self) -> impl Iterator<Item = (&Id<DP::P>, &DP::Priority)> {
self.prioritized_potential_packages.iter()
}

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

0 comments on commit 59659de

Please sign in to comment.