scenarios: add basic test for testing marker disjointness#182
Merged
BurntSushi merged 1 commit intomainfrom Jun 7, 2024
Merged
scenarios: add basic test for testing marker disjointness#182BurntSushi merged 1 commit intomainfrom
BurntSushi merged 1 commit intomainfrom
Conversation
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.