Open tokoko opened 1 week ago
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:
[project]
name = "example"
[project.optional-dependencies]
np = [
"numpy",
]
all = [
"example[np]"
]
[tool.pixi.project]
channels = ["conda-forge"]
platforms = ["linux-64"]
[tool.pixi.environments]
np = {features = ["np"]}
all = {features = ["all"]}
I'm able to run pixi run -e np python -c "import numpy"
just fine, but when I try pixi run -e all python -c "import numpy"
I'm getting No module named 'numpy'
error.
Here's the output from uv compile command (uv pip compile --extra all pyproject.toml
):
# This file was autogenerated by uv via the following command:
# uv pip compile --extra all pyproject.toml
numpy==2.0.2
# via example (pyproject.toml)
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.
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.