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

run cargo autoinherit #9030

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zancas
Copy link
Contributor

@zancas zancas commented Nov 16, 2024

Motivation

The purpose of this change is to unify redundant dependency information into a Single Source of Truth in the workspace Cargo.toml.

Here's result of a search for a dependency before running the tool:

grep -r -e"color-eyre = \"0.6.3\"" */Cargo.toml
tower-batch-control/Cargo.toml:color-eyre = "0.6.3"
zebra-chain/Cargo.toml:color-eyre = "0.6.3"
zebra-consensus/Cargo.toml:color-eyre = "0.6.3"
zebra-grpc/Cargo.toml:color-eyre = "0.6.3"
zebra-node-services/Cargo.toml:color-eyre = "0.6.3"
zebra-rpc/Cargo.toml:color-eyre = "0.6.3"
zebra-scan/Cargo.toml:color-eyre = "0.6.3"
zebra-state/Cargo.toml:color-eyre = "0.6.3"
zebra-test/Cargo.toml:color-eyre = "0.6.3"
zebra-utils/Cargo.toml:color-eyre = "0.6.3"

The same version information is set in 10 different sources of truth.

After the tool runs the version is specified (uniquely) in the workspace Cargo.toml:

grep -e"color-eyre = " Cargo.toml
color-eyre = { version = "0.6.3", default-features = false }

Specifications & References

https://crates.io/crates/cargo-autoinherit

Solution

cargo autoinherit

Tests

I manually tested by running:

cargo nextest run

PR Author's Checklist

  • [ * ] The PR name will make sense to users.
  • The PR provides a CHANGELOG summary.
  • [ * ] The solution is tested.
  • The documentation is up to date.
  • The PR has a priority label.

PR Reviewer's Checklist

  • The PR Author's checklist is complete.
  • The PR resolves the issue.

@zancas zancas requested review from a team as code owners November 16, 2024 22:22
@zancas zancas requested review from arya2 and upbqdn and removed request for a team November 16, 2024 22:22
@github-actions github-actions bot added the C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG label Nov 16, 2024
@zancas zancas mentioned this pull request Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant