-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
fix(puzzle): handle self-referential extras #10124
Conversation
Reviewer's Guide by SourceryThis pull request introduces the ability to handle self-referential extras in package dependencies. It modifies the solver to correctly resolve dependencies when extras refer to each other, either directly or through nested extras. Additionally, it includes new test cases to verify the correct behavior of the solver and installer with self-referential extras. Class diagram for dependency resolution changesclassDiagram
class Package {
+extras: Dict
+requires: List
+is_root(): bool
}
class Dependency {
+name: str
+extras: Set
+is_optional(): bool
+in_extras: List
}
class Provider {
+complete_package()
}
Package -- Dependency : contains
Provider -- Package : processes
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
I'm not sure what you're trying to do in the failing test, so far as I can tell the code is right and the test is wrong. I think the sort of test you want is something like:
|
You are quite possibly correct. I only looked at it briefly, and the test setup is incorrect. That said, there is also the issue of the marker not being propagated or being accounted for if it is on an extra dependency; which I had hoped #10119 would fix - but I reckon that was incomplete as well. |
Co-authored-by: David Hotham <[email protected]>
973c8f4
to
e251296
Compare
Sorry about the multiple threads, decided to go back to #10106 to keep things together. #10106 (comment) |
This is an alternative proposed by @dimbleby for #10106.
Raising this as a draft to preserve the proposed chang as I had to revert to my original approach to ensure tests passed once #10119 was merged to
main
.Summary by Sourcery
Tests: