-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Introduce a [workspace.dependencies
] section in the top-level Cargo.toml
#145740
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
Conversation
Some changes occurred in src/tools/rustfmt cc @rust-lang/rustfmt
cc @davidtwco, @compiler-errors, @TaKO8Ki This PR changes rustc_public cc @oli-obk, @celinval, @ouz-a Some changes occurred in compiler/rustc_attr_parsing Some changes occurred in compiler/rustc_codegen_ssa Some changes occurred in exhaustiveness checking cc @Nadrieril Some changes occurred in src/tools/clippy cc @rust-lang/clippy The Miri subtree was changed cc @rust-lang/miri Some changes occurred in src/tools/compiletest cc @jieyouxu Some changes occurred in compiler/rustc_sanitizers cc @rcvalle |
ec2ac7a
to
c7f79dc
Compare
This comment has been minimized.
This comment has been minimized.
I think that this is a good idea that could help reduce our overall dependency count. If you remove the subtree changes, I'll r+ it. |
c7f79dc
to
200f56d
Compare
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
How would it reduce our dependency count? AFAIK the benefit is avoiding repetition.
I have done this. In case it helps, here are the submodules (edited output from
and here are the subtrees (edited output from
|
Two packages might inadvertedly depend on a different major version of a dependency. If they share the dependency version, that won't happen. |
@@ -62,6 +62,7 @@ exclude = [ | |||
[workspace.dependencies] | |||
# tidy-alphabetical-start | |||
bitflags = "2.9.3" | |||
itertools = "0.12.1" |
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.
should it not be kept at "0.12"... does it fail when built with "0.12.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.
I personally prefer specifying only the major version in Cargo.toml
, but since we have a lockfile, it shouldn't matter.
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.
The lockfile already had 0.12.1 in it. In every case I just specified the full version number that was present in the lockfile.
@@ -62,6 +62,7 @@ exclude = [ | |||
[workspace.dependencies] | |||
# tidy-alphabetical-start | |||
bitflags = "2.9.3" | |||
itertools = "0.12.1" |
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 personally prefer specifying only the major version in Cargo.toml
, but since we have a lockfile, it shouldn't matter.
@bors r+ |
Rollup of 6 pull requests Successful merges: - #144274 (add Option::reduce) - #145562 (Simplify macro generating ToString implementations for `&…&str`) - #145625 (improve float to_degrees/to_radians rounding comments and impl) - #145740 (Introduce a `[workspace.dependencies`] section in the top-level `Cargo.toml`) - #145885 (Inherit TCC in debuginfo tests on macOS) - #145905 (Stop calling unwrap when format foreign has trailing dollar) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #145740 - nnethercote:workspace-members, r=Kobzol Introduce a `[workspace.dependencies`] section in the top-level `Cargo.toml` It lets us avoid a lot of repetition of crate versions, etc. I've just done a few as a start. Many more can be done in follow-ups. r? `@Kobzol`
Add more to the `[workspace.dependencies]` section in the top-level `Cargo.toml` Following on from #145740. r? `@Kobzol`
…=Kobzol Add more to the `[workspace.dependencies]` section in the top-level `Cargo.toml` Following on from rust-lang#145740. r? `@Kobzol`
It lets us avoid a lot of repetition of crate versions, etc.
I've just done a few as a start. Many more can be done in follow-ups.
r? @Kobzol