Open travishathaway opened 1 year ago
Can packages in the repodata also depend on other packages + optional dependencies?
This CEP was mentioned by @chenghlee in a discussion at https://matrix.to/#/!ugIkjExjZULQyVDDNz:gitter.im/$vMqrBnqcqeOfqNq27A4epLJ_xDuIjXiu-59XN_KeBbk?via=gitter.im&via=matrix.org
I didn't yet read the text or discussion much, but just wanted to copy my points from the chat:
I don't understand why we need this feature. We already use in several cases multi-output recipes for optional dependencies where a package[feature]
on the pip
side is translated to a package-feature
package. For the sake of simplicity, I would prefer to avoid to define an additional way of doing it and keep the current way of doing it.
We already use in several cases multi-output recipes for optional dependencies where a
package[feature]
on thepip
side is translated to apackage-feature
package.
Yes, but it's a crutch, and a persistent paper cut that people run into and contributes substantially to friction and user-frustration for requirement-incompatibilities between PyPI and conda. Even a bunch of conda-forge recipes get this wrong (and don't even get a warning that this doesn't do what's expected!). It should IMO absolutely be fixed just based on those two points alone.
If we zoom out a little bit further, this "string-based work arounds instead of sufficiently expressive syntax/metadata" is a constant source of pain (the other huge pain point on this being the completely overloaded build strings), which I mention here because IMO both should be solved with the same syntax.
conda install package[feature,build_number=1,cuda=True]
would be orders of magnitude more user-friendly than the following jumble of symbols
conda install package-feature=*=cuda*_1
and that's even before getting into https://github.com/conda/conda/issues/11442, https://github.com/conda/conda-build/issues/4498, https://github.com/conda/conda-libmamba-solver/issues/446, etc.
My main concern is that I want to avoid is adding an attribute to repodata.json as this will take longer to propagate to all implementations.
It would be nice if the problem could be solved by mapping the square bracket syntax to plain packages, i.e. make this a client-side convention.
One example could be to map jaxlib[build_number=1,cuda,docs]
to jaxlib=*=*_1 jaxlib-cuda jaxlib-docs
.
This is a second attempt to draft a CEP for optional dependencies for use by conda compatible package managers (e.g.
conda
andmamba
).Please see the CEP itself for more information.