mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 13:25:00 +00:00
make universal resolver fork only when markers are disjoint (#4135)
The basic idea here is to make it so forking can only ever result in a resolution that, for a particular marker environment, will only install at most one version of a package. We can guarantee this by ensuring we only fork on conflicting dependency specifications only when their corresponding markers are completely disjoint. If they aren't, then resolution _must_ find a single version of the package in the intersection of the two dependency specifications. A test for this case has been added to packse here: https://github.com/astral-sh/packse/pull/182. Previously, that test would result in a resolution with two different unconditional versions of the same package. With this change, resolution fails (as it should). A commit-by-commit review should be helpful here, since the first commit is a refactor to make the second commit a bit more digestible.
This commit is contained in:
parent
0db1bf4df7
commit
c46fa74e65
7 changed files with 484 additions and 204 deletions
|
@ -1,2 +1,2 @@
|
|||
chevron-blue
|
||||
packse>=0.3.17
|
||||
packse>=0.3.18
|
||||
|
|
|
@ -46,7 +46,7 @@ nh3==0.2.17
|
|||
# via readme-renderer
|
||||
packaging==24.0
|
||||
# via hatchling
|
||||
packse==0.3.17
|
||||
packse==0.3.18
|
||||
# via -r scripts/scenarios/requirements.in
|
||||
pathspec==0.12.1
|
||||
# via hatchling
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue