pubgrub icon indicating copy to clipboard operation
pubgrub copied to clipboard

Error reporting: Repeated direct dependency with incompatible versions

Open zanieb opened this issue 2 years ago • 4 comments

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

When the root package depends multiple versions of the same package e.g. foo==1.0.0 and foo==2.0.0, the PubGrub user is required to merge versions via intersection to provide a single package and version pair. This results in a requirement on an empty set giving the unhelpful error message:

root 0.0.0 depends on foo ∅

Ideally the solver would accept multiple versions per package so the incompatibility can be tracked in the derivation tree.

Ideally the reporter would display both provided versions with a note that they are incompatible

Because root depends on foo==1.0.0 and root depends on foo==2.0.0 which cannot be satisfied, version solving failed.

zanieb avatar Nov 10 '23 17:11 zanieb

https://github.com/pubgrub-rs/pubgrub/tree/RPITIT is proving helpful for this — that's what I used in our prototypes to produce the "ideal" message.

zanieb avatar Nov 10 '23 18:11 zanieb

Are we still seeing ∅-errors?

konstin avatar Jun 07 '24 09:06 konstin

We shouldn't be seeing null sets in errors. I'm not sure about the direct dependency conflict thing.

zanieb avatar Jun 08 '24 17:06 zanieb

Actually we do show a nullset in this different case:

https://github.com/astral-sh/uv/blob/d7cc622d6cf2f53d64abd20bcddcffca41b67c6e/crates/uv/tests/pip_compile.rs#L8796

zanieb avatar Jun 08 '24 17:06 zanieb