Improve workspace dependency management #3546
Merged
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.
In preparation for #3541, I'm improving the way dependencies are managed across the
windows-rsrepo by leveraging the workspaceCargo.tomlto define all dependencies. This way, any time a crate's version is updated, it doesn't require that change to be repeated throughout the repo.Cargo still requires that the crate's version be specified in both the crate's
Cargo.tomlfile as well as the workspaceCargo.tomlfile, but the latter is now updated automatically bytool_workspace. This should make release management far less error-prone.This update also introduces
tool_test_allfor locally testing all crates individually.cargo test --alldoes a great job in general. The problem is that Cargo will try and optimize the build by aggregating all of the features required by all crates and thus does not catch the case when a particular crate depends on a feature that was not explicitly requested by that crate. Runningtool_test_allwill catch those. This is already done by thetest.ymlbuttool_test_alljust makes it easier to catch such mistakes locally before creating a PR.