Compatibility with `cargo publish --workspace`
Now that cargo publish supports the --workspace flag, it would be helpful if cargo-hack interoperated with the publish command and supported calling it with --dry-run to run verification on the feature powerset for the crates in the repo.
Today the cargo-hack command will only call individual crates with cargo publish rather than the workspace in one call, but with different features enabled.
Um, what kind of behavior are we actually looking for here?
- To properly check the combination of features, compilation per crate is required.
- If you want to handle dev-dependencies without cargo-hack's workspace behavior, cargo-no-dev-deps is the appropriate tool.
However, are you actually suggesting that cargo-hack perform a build for each package at target/package created by cargo publish --dry-run?
- To properly check the combination of features, compilation per crate is required.
That's a good point, because otherwise cargo will unify them. Thanks for calling that out.
However, are you actually suggesting that cargo-hack perform a build for each package at
target/packagecreated bycargo publish --dry-run?
I wasn't suggesting this, I was just trying to run the cargo publish --workspace command multiple times, each with a different feature set specified. But I guess how you describe it here is what it would do? That way it was running on one package at a time.