-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Fix x test core
when download-rustc is enabled
#110701
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
Update on this: since #110699 merged,
I'm too tired tonight to figure out if these are fixable or not; they're similar to the errors fixed in #110121 so maybe it's possible to do something clever like run Anyway, I'm not going to dig into it more tonight. |
(actually even now i think this is a terrible idea, if i'm going to do something like it at all i'd introduce a new |
actually hold on - the only reason I added the downloaded std to the sysroot in the first place was so ui-fulldeps tests would pass (since they need the std loaded at runtime to match the one the downloaded rustc was linked against). I think if we disable those tests when download-rustc is enabled we can avoid these issues altogether. That seems ok to me; ui-fulldeps tests are only testing the compiler itself, not std, and if download-rustc is enabled that means you haven't modified the compiler. |
this is not actually true - the version of std used for the downloaded rustc also needs to match the version used for the freshly built rustdoc:
|
Previously, this would print a message for each doctest, which was quite verbose: ``` doc tests for: /home/jyn/src/rust/src/doc/rustc/src/exploit-mitigations.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/instrument-coverage.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/json.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/linker-plugin-lto.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/lints/groups.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/lints/index.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/lints/levels.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/aarch64-apple-ios-sim.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/aarch64-nintendo-switch-freestanding.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/apple-watchos.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/armeb-unknown-linux-gnueabi.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/armv4t-none-eabi.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/armv5te-none-eabi.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/armv6k-nintendo-3ds.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/armv7-sony-vita-newlibeabihf.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/armv7-unknown-linux-uclibceabi.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/armv7-unknown-linux-uclibceabihf.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/esp-idf.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/fuchsia.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/kmc-solid.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/loongarch-linux.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/m68k-unknown-linux-gnu.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/mipsel-sony-psx.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/nto-qnx.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/openbsd.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/openharmony.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/riscv32imac-unknown-xous-elf.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/unknown-uefi.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/wasm64-unknown-unknown.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/x86_64-fortanix-unknown-sgx.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/x86_64-unknown-none.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/profile-guided-optimization.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/target-tier-policy.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/targets/custom.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/targets/index.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/tests/index.md doc tests for: /home/jyn/src/rust/src/doc/rustc/src/what-is-rustc.md ```
x test core
when download-rustc is enabledx test core
when download-rustc is enabled
This comment has been minimized.
This comment has been minimized.
This works by building std from source unconditionally instead of downloading it, for library tests only. This was somewhat complicated because of the following requirements: 1. Unconditionally downloading libstd breaks `x test std`, because `coretests` requires the std loaded from the sysroot to match the std that's currently being tested. 2. Unconditionally rebuilding libstd breaks `x test ui-fulldeps librustdoc`, because anything loading `rustc_private` needs to use the same libstd that rustc was built with. Break the knot by introducing a new `stage2-test-sysroot`, used only for testing `std` itself. This holds a freshly compiled std, while `stage2` and `ci-rustc-sysroot` still hold the downloaded std. This also extends the existing `cp_filtered` in Sysroot to apply to the `rust-std` component, not just the `rustc-dev` component.
Sad that all this complexity is needed, but seems OK -- I don't see obvious ways to get around it. @bors r+ |
Fix `x test core` when download-rustc is enabled Fix `x test --stage 2 core` when download-rustc is enabled This works by building std from source instead of downloading it, for library tests only. This was somewhat complicated because of the following requirements: 1. Unconditionally downloading libstd breaks `x test core`, because `coretests` requires the std loaded from the sysroot to match the std that's currently being tested. 2. Unconditionally rebuilding libstd breaks `x test ui-fulldeps librustdoc`, because anything loading `rustc_private` needs to use the same libstd that rustc was built with. Break the knot by introducing a new `stage2-test-sysroot`, used only for testing `std` itself. This holds a freshly compiled std, while `stage2` and `ci-rustc-sysroot` still hold the downloaded std. This also extends the existing `cp_filtered` in Sysroot to apply to the `rust-std` component, not just the `rustc-dev` component, to avoid having both versions of std in `stage2-test-sysroot`. Fixes rust-lang#110352.
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#109093 (add `#[doc(alias="flatmap")]` to `Option::and_then`) - rust-lang#110701 (Fix `x test core` when download-rustc is enabled) - rust-lang#111982 (Revert "Enable incremental independent of stage") - rust-lang#112158 (Add portable-simd mention) - rust-lang#112172 (doc: improve explanation) - rust-lang#112178 (Fix bug where private item with intermediate doc hidden re-export was not inlined) r? `@ghost` `@rustbot` modify labels: rollup
Fix
x test --stage 2 core
when download-rustc is enabledThis works by building std from source instead of downloading it, for library tests only.
This was somewhat complicated because of the following requirements:
x test core
, becausecoretests
requires the std loaded from the sysroot to match the std that's currently being tested.x test ui-fulldeps librustdoc
, because anything loadingrustc_private
needs to use the same libstd that rustc was built with.Break the knot by introducing a new
stage2-test-sysroot
, used only for testingstd
itself. Thisholds a freshly compiled std, while
stage2
andci-rustc-sysroot
still hold the downloaded std.This also extends the existing
cp_filtered
in Sysroot to apply to therust-std
component, not just therustc-dev
component, to avoid having both versions of std instage2-test-sysroot
.Fixes #110352.