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

[CLI] Ability to provide multiple packages #75

Closed
4 of 7 tasks
jaudiger opened this issue Jul 5, 2024 · 4 comments
Closed
4 of 7 tasks

[CLI] Ability to provide multiple packages #75

jaudiger opened this issue Jul 5, 2024 · 4 comments
Labels
good first issue Good for newcomers

Comments

@jaudiger
Copy link
Contributor

jaudiger commented Jul 5, 2024

I was wondering if it would be possible to extend the current command line to set the parameter '-p, --project' multiple times:

> brioche install -p packages/openssl -p packages/rust
error: the argument '--project <PROJECT>' cannot be used multiple times

Installing more than one package at a time would be simplified, and prevent calling brioche more than needed. Few similar package managers allow this pattern, such as Nix:

> nix-shell -p oniguruma -p pssh

Progress:

  • Build
  • Check
  • Format
  • Install
  • Publish
  • Run sandbox
  • Run
@kylewlacy
Copy link
Member

Yep, I like this! I think the initial implementation could be as simple as looping over each -p argument and installing each one independently. The same should apply to the -r argument for installing packages from the registry (and it would make sense to me to allow mixing them together)

@jaudiger
Copy link
Contributor Author

jaudiger commented Jul 6, 2024

Ok, I'll work on this one if it suits you.

@jaudiger
Copy link
Contributor Author

I updated the issue to add progress of the work done so far. The remained commands that have not been updated are:

  • Build
  • Run

Both commands are special, and should not been ported to use more than one project/registry project, I think.

What does it mean to run multiple projects at the same time? Should we run them sequentially, in parallel?
On the other side, the build command takes optionally an output parameter, but we can't use the same output path for multiple projects. We could have a sort of logic to append a path per project. But should we do open this use case? Let's say the command was: brioche build -p packages/foo -p packages/bar -o output. Brioche could end up with the following output folders:

  • output/foo
  • output/bar

@kylewlacy
Copy link
Member

@jaudiger Agreed, I don't think either one should really be updated to take multiple arguments

Updating brioche build might make sense, but I'd rather hold off until there's a concrete use-case for it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants