Skip to content

Use Rust workspace dependencies instead of repeating versions in each Cargo.toml #3397

Closed
@teor2345

Description

@teor2345

Currently, when we do a large upstream upgrade (like #3394), we have to modify around 70 Cargo.toml files with the same version bumps.

But Rust supports workspace-level dependencies, where the workspace contains the version, and the crates just need to say they use the dependency (and any extra features, and if it's optional):
https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#inheriting-a-dependency-from-a-workspace

cargo-autoinherit will unify git and path dependencies automatically:
https://github.com/mainmatter/cargo-autoinherit

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions