-
Notifications
You must be signed in to change notification settings - Fork 458
Open
Labels
approvedThe Pixi maintainers welcome contributions to solve this issue or implement the feature/bugfix.The Pixi maintainers welcome contributions to solve this issue or implement the feature/bugfix.enhancementNew featuresNew featuresgood first issueGood for newcomersGood for newcomershelp wantedMaintainers would like community inputMaintainers would like community input
Description
Problem description
Can we sort dependencies alphabetically and put them in separate lines in the pixi.toml or pyproject.toml when we perform actions that manipulates the toml file? Package managers like uv and npm do this. This is done so that if people remove and add a package back in it won't create a diff or the diff is more meaningful.
For example, right now we run pixi add -f dev --pypi ruff mypy, it'll generate:
[dependency-groups]
dev = ["ruff>=0.15.5,<0.16", "mypy>=1.19.1,<2"]If we run pixi remove -f dev --pypi ruff && pixi add -f dev --pypi ruff, the toml becomes:
dev = ["mypy>=1.19.1,<2", "ruff>=0.15.5,<0.16"]Now the diff exists even though technically nothing has been done.
Usually, people like to do this when they want to force the version to be pinned to a newer version in the toml; if it's sorted and placed on a new line then the diff is more obvious, e.g.,
dev = [
"mypy>=1.19.1,<2",
- "ruff>=0.14.14,<0.15",
+ "ruff>=0.15.5,<0.16",
]Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
approvedThe Pixi maintainers welcome contributions to solve this issue or implement the feature/bugfix.The Pixi maintainers welcome contributions to solve this issue or implement the feature/bugfix.enhancementNew featuresNew featuresgood first issueGood for newcomersGood for newcomershelp wantedMaintainers would like community inputMaintainers would like community input