-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Omit stdarch test crates from the rust-src component #94907
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
@bors try Just to be able to do a sanity check that |
⌛ Trying commit 027d019c0e2a78fe9dd2b162dd9c3d0b8015ee83 with merge 549b2d65748f5d0c931bafbc58b53389ac8318d7... |
try build is done (549b2d65748f5d0c931bafbc58b53389ac8318d7), and r=me presuming -Zbuild-std works for you, ideally with commits squashed. |
These crates aren't necessary for building the standard library. This saves 30MB of disk space. Fixes rust-lang#94906
0c95b2d
to
cd5e75a
Compare
@bors r=Mark-Simulacrum |
📌 Commit cd5e75a has been approved by |
The new src directory is 27MB vs 57MB before this change. |
…askrgr Rollup of 5 pull requests Successful merges: - rust-lang#93292 (Implement `BITS` constant for non-zero integers) - rust-lang#94777 (Update armv7-unknown-linux-uclibceabi platform support page.) - rust-lang#94816 (Add `Atomic*::get_mut_slice`) - rust-lang#94844 (Reduce rustbuild bloat caused by serde_derive) - rust-lang#94907 (Omit stdarch test crates from the rust-src component) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
@@ -821,6 +821,11 @@ impl Step for Src { | |||
// not needed and contains symlinks which rustup currently | |||
// chokes on when unpacking. | |||
"library/backtrace/crates", | |||
// these are 30MB combined and aren't necessary for building | |||
// the standard library. | |||
"library/stdarch/crates/Cargo.toml", |
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.
This should have been
"library/stdarch/Cargo.toml",
I think. In Rust 1.61.0, rust-src
includes src/rust/library/stdarch/Cargo.toml
, which includes
[workspace]
members = [
"crates/stdarch-verify"
This didn't show up when testing with -Zbuild-std
since the standard list of crates to include when building std
does not include stdarch
, but it will show up if a user explicitly requests stdarch
. Or, perhaps more importantly, because of #95736, many editors (like IntelliJ) won't treat the root of rust-src
as a workspace, and will instead recurse into all the sub-crates directly, which then includes stdarch
.
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.
Right, my bad.
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 filed #97228 with a fix 👍
The path `library/stdarch/crates/Cargo.toml` does not exist. This was introduced in rust-lang#94907.
Omit stdarch workspace from rust-src The path `library/stdarch/crates/Cargo.toml` does not exist. In Rust 1.61.0, `rust-src` still includes `src/rust/library/stdarch/Cargo.toml` (but not `stdarch-verify`), which includes ```toml [workspace] members = [ "crates/stdarch-verify" ``` This didn't show up when testing with `-Zbuild-std` in rust-lang#94907 since the [standard list of crates](https://github.com/rust-lang/cargo/blob/f624095e1c98228a74a165ddb702078c0dd8b81e/src/cargo/core/compiler/standard_lib.rs#L26-L30) to include when building `std` does not include `stdarch`, but it will show up if a user explicitly requests `stdarch`. Or, perhaps more importantly, because of rust-lang#95736, many editors (like IntelliJ) won't treat the root of `rust-src` as a workspace, and will instead recurse into all the sub-crates directly, which then includes `stdarch`. Also related to rust-lang#94906.
These crates aren't necessary for building the standard library. This saves 30MB of disk space.
Fixes #94906