Closed Gankra closed 1 year ago
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, --all-targets
is a trick:
--all-targets
Test all targets. This is equivalent to specifying --lib --bins --tests --benches --examples.
--doc
Test only the library’s documentation. This cannot be mixed with other target options.
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 --help
documentation is the "source of truth" for supported functionality and flags. It does appear the online documentation is missing any mention of this feature.
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: