mirror of https://github.com/astral-sh/uv
When a fork is created from a list of dependencies, we were previously adding all other sibling dependencies to every fork created. But this isn't actually quite right, since the fork created is always created by some marker expression. And while it is definitively disjoint from any directly conflicting dependency specification, it is also possibly disjoint with other dependencies. For example, as reported in #4414: ```toml dependencies = [ "anyio==4.4.0 ; python_version >= '3.12'", "anyio==4.3.0 ; python_version < '3.12'", "b1 ; python_version >= '3.12'", "b2 ; python_version < '3.12'", ] ``` The first two `anyio` requirements are conflicting with non-overlapping marker expressions, and so a fork is created. Prior to this commit, *both* `b1` and `b2` would be added to each fork. But of course, `b2` is impossible in the `anyio==4.4.0` fork because of disjoint marker expressions. So in this commit, we specifically filter out any sibling dependencies that could find their way into a fork that have disjoint markers with that fork. We are careful to do this both when a new fork is created from an existing set of dependencies, and when adding new dependencies to a fork. Fixes #4414 |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||