Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scenarios: add basic test for testing marker disjointness #182

Merged
merged 1 commit into from
Jun 7, 2024

Conversation

BurntSushi
Copy link
Member

The description in the test explains things, but this is just adding a
basic test to ensure that forking in the universal resolver is done by
inspecting marker disjointness.

The description in the test explains things, but this is just adding a
basic test to ensure that forking in the universal resolver is done by
inspecting marker disjointness.
@BurntSushi BurntSushi requested a review from zanieb June 7, 2024 15:51
@BurntSushi BurntSushi merged commit 1bb597b into main Jun 7, 2024
5 checks passed
@BurntSushi BurntSushi deleted the ag/fork-marker-disjoint branch June 7, 2024 16:31
charliermarsh pushed a commit to astral-sh/uv that referenced this pull request Jun 7, 2024
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:
astral-sh/packse#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant