-
Notifications
You must be signed in to change notification settings - Fork 276
Support Recursive Optional Dependencies #2024
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
Comments
cc @baszalmstra as you've been the pixi update frontrunner :) |
@tokoko Are you able to create a minimal reproducer? |
@ruben-arts sure, I tested with the following just now:
I'm able to run Here's the output from uv compile command (
Hope this helps |
Thank you, I would like to ask @tdejager for his input as this is a use-case I'm not sure we have tried to support yet. |
Thanks @tokoko for the example. @ruben-arts @tdejager
I am not sure this is fixable / should be fixed. This comes from the recursive nature of pyproject extras, versus the distinction in pixi between features and environments. A middle ground may be to issue a warning during the parsing of the |
@olivier-lacroix Thanks for jumping in! Could we support it by just simply making it understand "self" and in the example case result in skipping |
It is indeed what happens currently. And the |
I want to start using All of our dev = [
"myproject[docs]",
"myproject[lint]",
"myproject[test]",
"other-dep>=1.0",
] This will unfortunately be a blocker for adoption. I can fix up the environments in my own repos but your average analyst here wouldn't have the necessary skills/knowledge (yet) 😞. |
@dhirschfeld ah that's unfortunate :(. Would dependency groups make sense for your use case? https://packaging.python.org/en/latest/specifications/dependency-groups/ |
I'm not sure - I've never used them! 🤔 I'm not too sure of the motivation for dependency groups as it seems to just duplicate the recursive optional dependency functionality? ...but it seems more limited in that it can only be a collection of existing groups? As shown in the example above, my extras are combinations of existing extras plus other packages. Also, I'd like the extras to be installable - that doesn't seem possible with dependency groups?
Finally, I will need my projects to be usable by both |
@dhirschfeld handling recursive extras would be possible indeed. In the meantime, you can use
|
That's what I'm doing for now. It's actually working fine, as 90% of repos don't define their own custom extras groups and the owners of repos which do define custom extras groups are usually sophisticated enough to fix up their default |
Problem description
We're migrating to pyproject.toml and plan to switch to using recursive optional dependencies similar to what's described here. Seems like uv handles such dependencies correctly (during during
compile
andsync
), butpixi update
basically ignores additional extras when constructing a lock file. An example here.The text was updated successfully, but these errors were encountered: