Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
cargo: Clean up dependencies
Merged lorenz opened 10 months ago

All dependencies that are dependencies of multiple crates within the workspace were pulled up to the root Cargo.toml. Dependencies that are dependencies of just one crate within the workspace remain in the */Cargo.toml of that particular crate.

Generally, this helps us keep an overview of dependencies:

  • If multiple crates depend on a crate, we will see the reference to the workspce.
  • Otherwise, we will see a line that specifies the version.

It is up to the maintainers to recognize when a dependency becomes a dependency of multiple crates in the workspace, at which point it should be moved to the workspace.

The tool cargo-autoinherit can be used to automatically pull ALL dependencies to the workspace. I used this, and in a separate, manual step, filtered out those dependencies that are dependencies of a single crate only, moving those back manually.

At the same time, I also unified depending on sibling crates in the workspace. This is now also done via workspace dependencies.

See:

  • https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#inheriting-a-dependency-from-a-workspace
  • https://github.com/mainmatter/cargo-autoinherit
lorenz opened with revision aa2df209 on base 3bc0db68 +296 -915 10 months ago

All dependencies that are dependencies of multiple crates within the workspace were pulled up to the root Cargo.toml. Dependencies that are dependencies of just one crate within the workspace remain in the */Cargo.toml of that particular crate.

Generally, this helps us keep an overview of dependencies:

  • If multiple crates depend on a crate, we will see the reference to the workspce.
  • Otherwise, we will see a line that specifies the version.

It is up to the maintainers to recognize when a dependency becomes a dependency of multiple crates in the workspace, at which point it should be moved to the workspace.

The tool cargo-autoinherit can be used to automatically pull ALL dependencies to the workspace. I used this, and in a separate, manual step, filtered out those dependencies that are dependencies of a single crate only, moving those back manually.

At the same time, I also unified depending on sibling crates in the workspace. This is now also done via workspace dependencies.

See:

  • https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#inheriting-a-dependency-from-a-workspace
  • https://github.com/mainmatter/cargo-autoinherit
lorenz pushed revision 2 6cbbf5cc on base d50df68b +246 -855 10 months ago

Update base.

fintohaps merged revision 6cbbf5cc at eea6a9bc 10 months ago