Skip to content

feat(cargo-acap-sdk): Always capture --package - #257

Open
apljungquist wants to merge 2 commits into
mainfrom
capture-package
Open

feat(cargo-acap-sdk): Always capture --package#257
apljungquist wants to merge 2 commits into
mainfrom
capture-package

Conversation

@apljungquist

@apljungquist apljungquist commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator

Previously the control commands (start, stop, restart, remove) would capture -p before -- while the build-based commands (build, run, test, install) accepted package selection only as a pass-through argument after --. Remembering which form each command wants is annoying, and it makes converting a command like cargo-acap-sdk install -- -p my_app into the corresponding start command ever so slightly more work.

Capturing was chosen over passing through because the control commands do not wrap cargo, so they have no -- to pass -p through to making implementing the parsing and help text generation annoying.

cargo-acap-build is deliberately left alone. It captures only options that are not cargo options, and --package would be the first exception to that which would require users of that tool to start remembering which cargo options are captured and which are not. This leaves the experience for users of both tools inconsistent, but I think consistency across commands within a program is more important than across programs.

Details

Makefile:

  • The behavior of install changes because the new behavior is likely the intended behavior since it matches the documentation comment and there is a separate verb for installing all packages.

Previously the control commands (start, stop, restart, remove) would capture `-p` before `--` while the build-based commands (build, run, test, install) accepted package selection only as a pass-through argument after `--`.
Remembering which form each command wants is annoying, and it makes converting a command like `cargo-acap-sdk install -- -p my_app` into the corresponding start command more work.

Capturing was chosen over passing through because the control commands do not wrap cargo, so they have no `--` to pass `-p` through to.

`cargo-acap-build` is deliberately left alone.
It captures only options that are not cargo options, and `--package` would be the first exception to that which would require users of that tool to start remembering which cargo options are captured and which are not.
This leaves the experience for users of both tools inconsistent, but I think consistency across commands within a program is more important than across programs.

Details
=======

`Makefile`:
- The behavior of `install` changes because the new behavior is likely the intended behavior since it matches the documentation comment and there is a separate verb for installing all packages.
@apljungquist
apljungquist marked this pull request as ready for review August 30, 2026 19:47
@apljungquist
apljungquist requested a review from a team as a code owner August 30, 2026 19:47
@apljungquist
apljungquist requested a review from guoxe August 30, 2026 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant