-
Notifications
You must be signed in to change notification settings - Fork 379
Description
Checks
-
I have checked that this issue has not already been reported.
-
I have confirmed this bug exists on the latest version of pixi, using
pixi --version.
Reproducible example
The below pyproject.toml demonstrates two bugs with the new recursive dependency support:
[project]
authors = [{name = "Dave Hirschfeld", email = "[email protected]"}]
name = "deleteme"
requires-python = ">= 3.11"
version = "0.1.0"
dependencies = []
[project.optional-dependencies]
all = [
"deleteme[group-one]",
"deleteme[group_two]",
]
group-one = [
"anyio>=4.9.0",
"pyarrow>=16.0.0,<21",
]
group_two = [
"trio>=0.31.0",
"pyarrow>=19.0.0",
]
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling"]
[tool.pixi.workspace]
requires-pixi = ">=0.56.0"
channels = ["https://prefix.dev/conda-forge"]
platforms = ["linux-64"]
[tool.pixi.pypi-dependencies]
deleteme = { path = ".", editable = true }Bug 1
❯ pixi update
Error: × Failed to find optional dependency `group-two` included by extra:allIt appears that the group_two is being normalised when specified as deleteme[group_two] in the all group, but the name of the group group_two isn't being normalised causing a mismatch.
This is easily enough fixed by changing the name to group-two, but that then exposes...
Bug 2
❯ pixi update
Error: × pyarrow is already a dependency.The implementation complains about duplicate dependency specifications. This should obviously be allowed, with the behaviour that the constraints are unioned for all specifications of that package - e.g. the constraint for pyarrow in the all feature would be pyarrow>=19.0.0,<21.
This one is not so easily worked-around.
Expected behavior
- Group names should be normalised so that you can use underscores without causing an error
- Duplicate package specifications should be allowed both within and in different groups with the constraints from all specifications being unioned.