pubgrub-rs / pubgrub

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

Dependency version with invalid direct dependencies should be tracked as incompatibility #151

Closed zanieb closed 7 months ago

zanieb commented 7 months ago

Example at https://github.com/zanieb/pubgrub/blob/zanie/examples/examples/unsat_indirect_dependency_conflict_backtrack.rs

Given the following situation:

The solver fails with an empty dependency set on foo 1.2. Instead, the solver should mark foo 1.2 as incompatible(?) and backtrack to a valid version of foo such as 1.1.

zanieb commented 7 months ago

In general, we need to be able to indicate that some package version does not have valid dependencies and should be ignored with a custom message for reports. I opened https://github.com/pubgrub-rs/pubgrub/issues/152 to track that.

Eh2406 commented 7 months ago

The solver fails with an empty dependency set on foo 1.2.

Is this the DependencyOnTheEmptySet error? There is discussion about removing it in https://github.com/pubgrub-rs/pubgrub/issues/125 and it was removed in #133, please try the dev branch and let me know if it's still a problem.

zanieb commented 7 months ago

Ah thank you — I misunderstood the main branch in this project and have rebased my examples onto the dev branch.

This example indeed solves with dev.