uv/crates/uv-resolver
Andrew Gallant 83f1abdf57 uv-resolver: add error checking for conflicting distributions
This PR adds some additional sanity checking on resolution graphs to
ensure we can never install different versions of the same package into
the same environment.

I used code similar to this to provoke bugs in the resolver before the
release, but it never made it into `main`. Here, we add the error
checking to the creation of `ResolutionGraph`, since this is where it's
most convenient to access the "full" markers of each distribution.

We only report an error when `debug_assertions` are enabled to avoid
rendering `uv` *completely* unusuable if a bug were to occur in a
production binary. For example, maybe a conflict is detected in a marker
environment that isn't actually used. While not ideal, `uv` is still
usable for any other marker environment.

Closes #5598
2024-09-24 10:55:23 -04:00
..
src uv-resolver: add error checking for conflicting distributions 2024-09-24 10:55:23 -04:00
Cargo.toml Run cargo upgrade (#7448) 2024-09-17 12:39:58 +02:00