-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add a --profile flag to be more general than --debug-build #198
Conversation
This also does some driveby fixes to add `.action(ArgAction::SetTrue))` to a bunch of --flags because a breaking change was made to clap: https://github.com/clap-rs/clap/blob/master/CHANGELOG.md#migrating
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR.
I understand the need and I like the flexibility with defining other profiles.
I am not sure what is going on with the tests and CI. Would you be able to take a look and possibly add a test that uses the new --profile
argument?
* Limit assert_fs to 1.0.12 (1.0.13 requires rust 1.65.0 * Add rust-version field so that devs know we care about msrv * Add Cargo.lock so the CLI's build is reproducible
pushed a potential fix (only the dependency change really matters, but figured I'd toss in the rest) |
Oh right, tests, will do. |
Great call on the tests -- I had tested things pretty thoroughly for my exact usecase but completely blanked on testing (and apparently implementing!) actual builds. Some extra logic was required to deal with the mismatch between builtin profile names and the output dirs they go to. I also fixed some broken doctests, because your CI wasn't testing docs (unfortunately according to cargo test's docs,
Running rustdoc with -Dwarnings gets the desired functionality, so I added that to your CI. |
Thank you for tests. They are really appreciated and look great. I missed the doc builds for the CI. Nice catch. This is ready merge. Thank you. |
Hi - was looking for this setting and found this PR - is this documented anywhere (along with what flags it is incompatible with), the docs don't appear to have this! Does appear in the cli --help tho so may have just been looking in wrong place. |
@KGrewal1 The online documentation might be out-of-sync. The |
This also does some driveby fixes to add
.action(ArgAction::SetTrue))
to a bunch of --flags because a breaking change was made to clap:https://github.com/clap-rs/clap/blob/master/CHANGELOG.md#migrating
I'm experimenting with adding support for cargo-wix, but to avoid duplicate builds I want to use --no-build (and as far as I can tell cargo-wix doesn't set any particularly special cargo/rust build flags, so we aren't messing up something important by doing that).
However cargo-dist sets --profile=dist which changes the directory the binaries end up in, so I need cargo-wix to be able to take an arbitrary
--profile
. Thankfully this is very easy to do, as you already made all your logic work with an abitrary profile string.For the record the specific invocation I would use would look like: