pixi
pixi copied to clipboard
`pixi add` with packages and workspaces
Based on this issue: https://github.com/prefix-dev/pixi/issues/2807
We find out with @ruben-arts that pixi add logic should be updated to take into account packages and workspace.
Quoting the comment as the new spec.
We want the user to have a comfortable CLI to add packages to both workspaces and packages.
A package can be added to [dependencies], [package.run-dependencies], [package.host-dependencies], [package.build-dependencies] and all it's target and feature(only on workspace) variants.
pixi add package-x: Has a little automation in it to simplify the UX for the user.- If there is a
[workspace]then add thepackage-xto[dependencies] - If there is ONLY a
[package]then add it to[package.run-dependencies], we do this for easier onboarding and UX comfort. (throwing an error here would result in a user needing to understandrunvshostvsbuildbefore they can get something working).
- If there is a
pixi add package-x --host/--run/--buildwill add it to[package.{type}-dependencies]IF it already has a[package]table. Otherwise, throw an error.pixi add package-x --workspacewill skip the automation and throw an error if there is no[workspace]. Conflicts with--host--run--build.pixi add --host --target unixwill add it to[package.target.unix.host-dependencies]
closing as duplicate