-
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
|
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`
FWIW this is not reliable, it'll only find More importantly, this PR unfortunately broke RA for people working on Miri, clippy, or anything else that uses the |
Crap, I was sure that there is in fact |
There's |
rust/src/bootstrap/src/core/build_steps/dist.rs Line 1130 in 6864a5b
rustc-rsc is the plain source tarball 🙃 The naming is really atrocious here.
|
Ah 🤦 |
This PR also prevents now publishing of rustc crates r-a uses: https://github.com/rust-analyzer/rustc-auto-publish/actions/runs/17381310033/job/49339257240. |
Is it possible to keep any of the workspace stuff or does it all need to be ripped out? |
I think all of them are problematic. Of course it's possible to make this work, but it means more work. The question is whether it is worth the effort. |
For the rustc dependency usecase (making RA work with Miri/clippy/...), it should suffice to include the root Cargo.toml in the rustc-dev package -- but it can't be the original workspace I don't know how the auto-publish works. I assume in general cargo supports publishing crates with workspace dependencies, and will "inline" those dependencies as part of |
CC @lnicola you probably know better than me the autopublish scripts. |
I will just revert this change, and the related follow-ups. rust-lang/rust/ is so unlike a normal Rust project that it's not worth doing dependencies this way. |
AIUI, we remove the workspace manifest, update the crate manifests to rename them and fix the dependencies between crates, and publishes them individually. It's a fork of a script from 8 years ago, so I guess it's just what worked, historically. |
This was done in rust-lang#145740 and rust-lang#145947. It is causing problems for people using r-a on anything that uses the rustc-dev rustup package, e.g. Miri, clippy. This repository has lots of submodules and subtrees and various different projects are carved out of pieces of it. It seems like `[workspace.dependencies]` will just be more trouble than it's worth.
…bzol Revert introduction of `[workspace.dependencies]`. This was done in #145740 and #145947. It is causing problems for people using r-a on anything that uses the rustc-dev rustup package, e.g. Miri, clippy. This repository has lots of submodules and subtrees and various different projects are carved out of pieces of it. It seems like `[workspace.dependencies]` will just be more trouble than it's worth. 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