-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
uv-resolver: introduce conflict markers
This commit adds a new concept to uv: conflict markers. Conflict markers resolve the ambiguity created in lock files, in some cases, when conflicting extras/groups are activated. Conflict markers allow us to make edges in the dependency graph conditional based only on which extras are and aren't enabled. Adding conflict markers themselves turned out to be somewhat easy. But what was hard was simplifying them. A good portion of the change in this commit is dedicated to simplification. We do two different kinds: 1. We imbibe "world knowledge" into the marker. That is, we take what we know about which extras/groups cannot be enabled simultaneously, then we simplify the markers based on this. 2. We walk the dependency graph and annotate which extras/groups are activated for each node for all possible paths into that node. When an extra (e.g., `foo`) is activated (or not activated) for all possible such paths, then we can replace `extra == 'foo'` (or `extra != 'foo'`) with `true` in any corresponding conflict marker expessions. Without these simplifications, it's very easy for conflict markers to appear almost everywhere in a lock file (when conflicting extras/groups are declared). Many of which are trivially true and aren't actually resolving any ambiguity and thus aren't needed.
- Loading branch information
1 parent
18a1ead
commit 26acf26
Showing
17 changed files
with
795 additions
and
126 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.