Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change pixi add to work comfortably with packages and workspaces. #2863

Open
tdejager opened this issue Jan 9, 2025 · 0 comments
Open

Change pixi add to work comfortably with packages and workspaces. #2863

tdejager opened this issue Jan 9, 2025 · 0 comments
Labels
area:build Related to pixi build

Comments

@tdejager
Copy link
Contributor

tdejager commented Jan 9, 2025

@nichmor and I worked on a little design to solve pixi add for packages vs workspaces.

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 the package-x to [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 understand run vs host vs build before they can get something working).
  • pixi add package-x --host/--run/--build will add it to [package.{type}-dependencies] IF it already has a [package] table. Otherwise, throw an error.
  • pixi add package-x --workspace will skip the automation and throw an error if there is no [workspace]. Conflicts with --host --run --build.
  • pixi add --host --target unix will add it to [package.target.unix.host-dependencies]

Originally posted by @ruben-arts in #2807

I've extacted this into a seperate issue, because the other will close, once the PR that fixes it is complete.

@tdejager tdejager added the area:build Related to pixi build label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:build Related to pixi build
Projects
None yet
Development

No branches or pull requests

1 participant