Bumping versions for all crates in a workspace

Hi, I have a large rust project that is organized as a workspace containing many crates. I have a problem bumping the version of all the crates automatically. As Rust projects with multiple crates are somewhat common, I assumed that this would be a solved problem, but I couldn't find any working solution.

To be more detailed, each crate in my workspace has its own Cargo.toml, where a version is specified. For simplicity, I keep the versions of all the crates the same. I would like to be able to bump the versions of all the crates together.

Doing something like a simple search and replace is not a very good solution, because there might be other dependencies having the same previous version (As Cargo.toml contains other dependencies). In addition, I need to be able to deal with inter-dependencies between the crates in the project. For example, one crate depends on another, and the version specified in the dependency should also be updated.

Example:

[package]
name = "offset-secure-channel"
version = "0.1.0"
license = "MIT OR Apache-2.0"
edition = "2018"

[dependencies]

common = { path = "../common", version = "0.1.0", package = "offset-common" }
crypto = { path = "../crypto", version = "0.1.0", package = "offset-crypto" }

Should be updated into:

[package]
name = "offset-secure-channel"
version = "0.1.1"
license = "MIT OR Apache-2.0"
edition = "2018"

[dependencies]

common = { path = "../common", version = "0.1.1", package = "offset-common" }
crypto = { path = "../crypto", version = "0.1.1", package = "offset-crypto" }
...

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.