pubgrub-rs / pubgrub

PubGrub version solving algorithm implemented in Rust
https://pubgrub-rs.github.io/pubgrub/pubgrub/
Mozilla Public License 2.0
337 stars 29 forks source link

Add `DerivationTree.packages() -> HashSet<&P>` #219

Closed konstin closed 1 month ago

konstin commented 1 month ago

In uv, we check the available versions to determine if there a prerelease versions and show an appropriate hint if required, mainly collecting package versions here to display a hint here.

This is the most efficient way of writing this function, but the derivation tree is small in the number of packages involved.

konstin commented 1 month ago

I added .packages() to the existing error test case to avoid duplicating the setup code, let me know if there's a better place for it.