KEMBAR78
Improve workspace dependency management by kennykerr · Pull Request #3546 · microsoft/windows-rs · GitHub
Skip to content

Conversation

@kennykerr
Copy link
Collaborator

@kennykerr kennykerr commented Mar 17, 2025

In preparation for #3541, I'm improving the way dependencies are managed across the windows-rs repo by leveraging the workspace Cargo.toml to 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.toml file as well as the workspace Cargo.toml file, but the latter is now updated automatically by tool_workspace. This should make release management far less error-prone.

This update also introduces tool_test_all for locally testing all crates individually. cargo test --all does 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. Running tool_test_all will catch those. This is already done by the test.yml but tool_test_all just makes it easier to catch such mistakes locally before creating a PR.

@kennykerr kennykerr merged commit d2f6420 into master Mar 17, 2025
36 checks passed
@kennykerr kennykerr deleted the tool_workspace branch March 17, 2025 17:30
This was referenced Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant