Skip to content

Commit d130d12

Browse files
committed
Add method to return undecided packages (#37)
This is used in uv for logging
1 parent 3046bc0 commit d130d12

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
@@ -257,6 +257,21 @@ impl<DP: DependencyProvider> PartialSolution<DP> {
257257
self.next_global_index += 1;
258258
}
259259

260+
/// The list of package that have not been selected after the last prioritization.
261+
///
262+
/// This list gets updated by [`Self::pick_highest_priority_pkg`] and cleared by backtracking.
263+
#[allow(clippy::type_complexity)]
264+
pub fn undecided_packages(
265+
&self,
266+
) -> impl Iterator<
267+
Item = (
268+
&Id<DP::P>,
269+
&(<DP as DependencyProvider>::Priority, Reverse<u32>),
270+
),
271+
> {
272+
self.prioritized_potential_packages.iter()
273+
}
274+
260275
/// Add a derivation.
261276
pub(crate) fn add_derivation(
262277
&mut self,

0 commit comments

Comments
 (0)