Skip to content

Commit 6a8f0b4

Browse files
committed
Add method to return undecided packages (#37)
This is used in uv for logging
1 parent 975a489 commit 6a8f0b4

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
@@ -244,6 +244,21 @@ impl<DP: DependencyProvider> PartialSolution<DP> {
244244
self.next_global_index += 1;
245245
}
246246

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

0 commit comments

Comments
 (0)