-
Notifications
You must be signed in to change notification settings - Fork 106
feat: implement extras with conditional dependencies #1542
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
feat: implement extras with conditional dependencies #1542
Conversation
…extras-using-conditional-dependencies
|
The benchmarks show a inconsistent difference of +-3% which seems fine to me! |
|
ugh, somehow the extras printing adds a single space after |
|
I think prefix-dev/resolvo#164 should fix this. |
…extras-using-conditional-dependencies
|
I updated the resolvo dependencies, merged main, and fixed the thing you find. This looks good from my perspective @wolfv |
|
Awesome stuff! I think now I need to rebase my PR in #1545 |
Uses conditional dependency support in resolve to implement extras. Result of some late-night hacking with @wolfv .
Extras a written as condition dependencies, e.g. if a package
foohas an optional dependency group calledbarThen conditional requirements are added for
fooin the form of:numpy; if foo[bar]. We add a special "extra" package that representsfoo[bar]. So as a user depends onfoowithbar(foo[bar]),numpywill also be selected.This also adds extras in a different way. Extras are completely optional now, so if a user depends on an extra that doesnt exist the solver will happily continue. Its up to users of the library to warn if an extra is selected that is not actually available for the selected package.