Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move redundant dependency information to workspace Cargo.toml #3411

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

teor2345
Copy link
Member

@teor2345 teor2345 commented Mar 4, 2025

This PR unifies all dependency specifiers in subspace/Cargo.toml, rather than repeating the same base dependency information across 75+ crates.

Some information can not be unified:

  • features that are different between crates (including when some crates use default features and some don't)
  • optional dependencies

To get more dependencies to unify, this PR also:

  • fixes missing local dependency version declarations
  • upgrades a thiserror dependency from 1.0.64 to 2.0.0

After the automated unification using cargo autoinherit, some fixes are needed:

  • renamed dependencies are not handled correctly, so they need manual fixes
  • a small number of features are not unified correctly

Close #3397

Code contributor checklist:

Copy link
Member

@NingLin-P NingLin-P left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! thank you!

Copy link
Member

@vedhavyas vedhavyas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thanks!

parity-scale-codec = { workspace = true, features = ["derive"] }
domain-runtime-primitives.workspace = true
frame-benchmarking = { workspace = true, optional = true }
frame-support.workspace = true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: would have preferred
frame-support = {workspace = true}

for consistency but not a blocker

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.

Use Rust workspace dependencies instead of repeating versions in each Cargo.toml
3 participants