-
Notifications
You must be signed in to change notification settings - Fork 900
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
uv-resolver: add error checking for conflicting distributions
This PR adds some additional sanity checking on resolution graphs to ensure we can never install different versions of the same package into the same environment. I used code similar to this to provoke bugs in the resolver before the release, but it never made it into `main`. Here, we add the error checking to the creation of `ResolutionGraph`, since this is where it's most convenient to access the "full" markers of each distribution. We only report an error when `debug_assertions` are enabled to avoid rendering `uv` *completely* unusuable if a bug were to occur in a production binary. For example, maybe a conflict is detected in a marker environment that isn't actually used. While not ideal, `uv` is still usable for any other marker environment. Closes #5598
- Loading branch information
1 parent
77c2496
commit 83f1abd
Showing
5 changed files
with
121 additions
and
39 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