pixi: unified dependency management for "secondary" package managers installed via `pixi add`
Problem description
Description
Currently, when building multi-language applications, such as for full-stack web development, users must manage conda packages in pixi.toml while other dependencies require separate files like package.json (for npm). This is difficult to scale as the project grows during development and requires either custom Pixi tasks to install sub-packages or manually starting a pixi shell and executing multiple npm install ... commands to build that part of the environment.
Proposed Solution
I propose an enhancement that would make pixi.toml the "ground truth" for all dependencies. Ideally, users could list npm packages (or other packages not sourced directly from conda) in pixi.toml. Pixi would then be responsible for:
- Syncing: Automatically generating or updating the relevant manifest (e.g.,
package.json) based on a new[tool.npm.dependencies]section. - Installation: Leveraging the installed ecosystem tools (
npm) to resolve these dependencies within the Pixi environment.
Example Syntax Idea
[dependencies]
python = ">=3.11"
nodejs = ">=20"
[tool.npm.dependencies]
react = ">=18.2.0"
typescript = "latest"
vite = "*"
Reasoning
- Developer Experience: Provides a "single pane of glass" for all project requirements.
- Reproducibility: Ensures that the versions of ecosystem packages are locked and tracked alongside the system-level dependencies.
- Onboarding: New contributors only need to run
pixi installto get the entire development environment ready to go.
I do like the idea, but I think this is just too ambitious at this point.
For pixi to be a ground truth, we would need to force people into pixi to populate other dependency management tools. That would create a lot of pushback in projects along the lines of "Why do I need to use pixi, just to fill in a list in my packages.json?".
Good point. I think it would probably make more sense for me or other developers to write our own convenience tasks if we want this kind of functionality. I will go ahead and close this issue.