Allow using --exclude
without also specifying --workspace
.
#258
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.
We're using
cargo-hack
at Linebender, in ~15 repositories and growing. Thanks for your continued maintenance of this project!In order for us to maintain CI scripts across that many repositories, we try to write them in a super generic way. So that we can mostly copy-paste the script and only have minimal configuration variables per repository.
For example, one set of variables we currently have for Xilem is:
So for the MSRV job we reference
RUST_MIN_VER_PKGS
instead of--workspace
and for the Wasm job we addNO_WASM_PKGS
. Works well. However a complication arises with the MSRV Wasm job! Because the combination of-p xilem -p xilem_core -p masonry --exclude masonry --exclude xilem
does not currently work withcargo-hack
.Our current solution is to just have a third variable:
It works, of course. However it would be nice to not have to keep this additional variable in sync, especially across all our repositories.
This PR here addresses the problem at the
cargo-hack
level by removing the requirement to also specify--workspace
when using--exclude
. This works nicely and allows us to remove that extra variable and skip the work of maintaining it for each repository.