-
Notifications
You must be signed in to change notification settings - Fork 161
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
Use cargo's workspace.package and workspace.dependencies #595
Conversation
This uses the new (rust 1.64) workspace.package cargo feature to reduce duplication and copy-paste errors.
Holly molly, didn't know this was a thing. A+++ for this. |
It's pretty new, I think 1.64. So only the merging of quic-rpc bumping MSRV to 1.65 enabled us to use this.
You mean catching a dependency added to a crate's Though I'm not sure how much of a problem it will be: if we consistently use them it should be pretty obvious in code review that it's forgotten. So my instinct would be to try it first without enforcement and only later add enforcement if it turns out it is needed. |
examples/Cargo.toml
Outdated
clap = { version = "4.0.9", features = ["derive"] } | ||
futures = "0.3.21" | ||
clap.workspace = true | ||
futures.workspace = true |
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.
i realise this example still needs cleaning up. i'll do this once there's approval in principle. this might also race the iroh-embed pr - so one of them will need fixing up anyway. and examples are touched by that pr
I am concerned about a couple of things here
|
Absolutely, and this is still possible. I think this is mostly a policy thing though and why I wrote down how I decided what feature to put where. To keep minimal perhaps the policy should change that by default as little features as possible are enabled in the [ Happy to make that change if we prefer. I couldn't decide myself here what was easier to work with.
Not sure I really agree. You look at that crate's |
https://github.com/crate-ci/cargo-release is not a part pf cargo |
fair enough, anyway - supported since v22 on 21 Oct 2022: https://github.com/crate-ci/cargo-release/releases/tag/v0.22.0 |
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.
haven’t reviewed every line, but lets try it out, if it doesn’t work we can always revert it
This uses the new (rust 1.64) workspace.package cargo feature to reduce duplication and copy-paste errors.
This switches to use cargo's new workspace.package and
workspace.dependencies features. It reduced duplication in the cargo
files.
A number of dependency versions where unified through this already.