feat(cargo-acap-sdk): Always capture --package - #257
Open
apljungquist wants to merge 2 commits into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously the control commands (start, stop, restart, remove) would capture
-pbefore--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 likecargo-acap-sdk install -- -p my_appinto 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-pthrough to making implementing the parsing and help text generation annoying.cargo-acap-buildis deliberately left alone. It captures only options that are not cargo options, and--packagewould 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:installchanges 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.