-
Notifications
You must be signed in to change notification settings - Fork 114
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
Switch Cargo.toml in packages to use workspace dependencies #1407
Conversation
I checked that all of these dependencies are used in other repos first.
It's much nicer to have the dependency versions defined once in the repo, for future upgrades. Why did the version spec change when moving to the root Cargo.toml? - hyper is used elswehere with different features, like rpc - serde is used elsewhere at higher versions, like portalnet - serde_yaml is used elsewhere at higher versions, like in trin-beacon
Why did the version spec change when moving to the root Cargo.toml? - async-trait is used elsewhere at higher versions, like portal-bridge - chrono is used elsewhere at higher versions, like trin-beacon
e66c2d6
to
72f7e67
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! 🚢
Few sidenotes.
Since Cargo.lock
wasn't updated, does that mean that there was no dependency that was used with different version?
Somewhat related, should we create issue(s) for:
- figuring out if we have some unused dependencies that can be removed
- e.g. using some tools like cargo-udeps
- if we find convenient tool, maybe create a github action that runs it weekly (similar to update dependencies)
- finding out if we have multiple crates that do the same thing and we can simplify to using one (e.g. I noticed
ssz-rs
inlight-client
and I'm wondering if we can replace it withethereum_ssz
)- probably more of a manual task, but it might not be too hard not that most dependencies are in one place
Yeah, I think because of the regular updates, like this one, most of the locked dependencies were further ahead of any of the Cargo.toml specs anyway.
Sure, I'll take a stab at writing some up 👍🏻 |
What was wrong?
Fix #845
How was it fixed?
My process:
There are several dependencies that are only used in a single package. I can see arguments for moving them to the workspace for tracking too. For example, if we don't move the dependencies, then it will be easy to accidentally create duplicates again in the future. But I landed on leaving them in place, because:
But I'm open to persuasive arguments :)
To-Do