-
Notifications
You must be signed in to change notification settings - Fork 732
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
uv-resolver: propagate markers to sibling dependencies in forks
When a fork occurs, we divide not just the dependencies that provoked a fork into distinct groups, but we also add the corresponding sibling dependencies to each fork. Previously, while we track markers on the fork itself, the individual dependencies that had markers only corresponded to markers written from the dependency specification. This meant that the sibling dependencies that got added to each fork would not themselves have markers attached to them. This in turn meant they would not have markers associated with them in the lock file. In many cases, this is actually okay, because the resolver will pick a version that is "universal" across all forks in most cases. But in some cases, this just simply isn't possible as the marker expressions in the fork can and do influence resolution. In which case, it is possible for the same package with different versions to show up in the lock file unconditionally. Which is a big no-no. So in this commit, after we determine the forks, we intersect the markers on each fork with each of its dependencies. This does seem to balloon the marker expressions in some cases. I plucked one low hanging fruit to avoid doing `x and x` in trivial cases. (And this eliminated a portion of the snapshot diffs.) But some pretty gnarly diffs remain. This commit also fixes another bug: previously, when we created a fork to capture the "remaining" universe of an incomplete set of markers, we left out dependencies that should be included in that fork. We rectify that here. Fixes #5086 Partially addresses #4732
- Loading branch information
1 parent
a17b55b
commit c7fe419
Showing
6 changed files
with
133 additions
and
23 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