Skip to content

Commit 99b25dd

Browse files
committed
Add method to return undecided packages (#37)
This is used in uv for logging
1 parent 0131488 commit 99b25dd

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/internal/partial_solution.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,21 @@ impl<DP: DependencyProvider> PartialSolution<DP> {
241241
self.next_global_index += 1;
242242
}
243243

244+
/// The list of package that have not been selected after the last prioritization.
245+
///
246+
/// This list gets updated by [`Self::pick_highest_priority_pkg`] and cleared by backtracking.
247+
#[allow(clippy::type_complexity)]
248+
pub fn undecided_packages(
249+
&self,
250+
) -> impl Iterator<
251+
Item = (
252+
&Id<DP::P>,
253+
&(<DP as DependencyProvider>::Priority, Reverse<u32>),
254+
),
255+
> {
256+
self.prioritized_potential_packages.iter()
257+
}
258+
244259
/// Add a derivation.
245260
pub(crate) fn add_derivation(
246261
&mut self,

0 commit comments

Comments
 (0)