-
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 --doc --stage 0 library/std
#95993
Conversation
I managed to break this in rust-lang#95449. I am not quite sure why this is the correct fix, but it doesn't break `doc --stage 0` and is strictly closer to the previous behavior. Previously, rustdoc would error with strange issues because of the mismatched sysroot: ``` error[E0460]: found possibly newer version of crate `std` which `rustc_span` depends on --> /home/jnelson/rust-lang/rust/compiler/rustc_lint_defs/src/lib.rs:14:5 | 14 | use rustc_span::{sym, symbol::Ident, Span, Symbol}; | ^^^^^^^^^^ | = note: perhaps that crate needs to be recompiled? = note: the following crate versions were found: crate `std`: /home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-ff9290e971253a38.rlib crate `std`: /home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-ff9290e971253a38.so crate `rustc_span`: /home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_span-ed11dce30c1766f9.rlib ```
(rust-highfive has picked a reviewer for you, use r? to override) |
Going to approve to get this unbroken, but I think there's two action items here: we should get these running in mingw-check or some other builder if they're too slow to verify they work in CI, and I suspect there's a missing --target argument to rustdoc which causes this when testing, probably because cross-compiling doctests is unusual. Something to look into at least. |
@bors r+ |
📌 Commit 69de213 has been approved by |
👍 I can work on that sometime this week.
Note that none of this involved cross-compiling - I think the |
We always pass --target to cargo, and it should always pass it down to rustc/rustdoc (I would expect) for non-host compiles. (The target is the same as the "native" triple most of the time, but it is still passed). The detection is used so that crates like build scripts link against the previous stages sysroot (e.g., beta or stage0) which is the "native" sysroot since std might not be available for the sysroot we would otherwise try to pass. (This is my recollection. It might be slightly off.) |
…Simulacrum Fix `x test --doc --stage 0 library/std` I managed to break this in rust-lang#95449. I am not quite sure why this is the correct fix, but it doesn't break `doc --stage 0` and is strictly closer to the previous behavior. Previously, rustdoc would error with strange issues because of the mismatched sysroot: ``` error[E0460]: found possibly newer version of crate `std` which `rustc_span` depends on --> /home/jnelson/rust-lang/rust/compiler/rustc_lint_defs/src/lib.rs:14:5 | 14 | use rustc_span::{sym, symbol::Ident, Span, Symbol}; | ^^^^^^^^^^ | = note: perhaps that crate needs to be recompiled? = note: the following crate versions were found: crate `std`: /home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-ff9290e971253a38.rlib crate `std`: /home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-ff9290e971253a38.so crate `rustc_span`: /home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_span-ed11dce30c1766f9.rlib ```
…Simulacrum Fix `x test --doc --stage 0 library/std` I managed to break this in rust-lang#95449. I am not quite sure why this is the correct fix, but it doesn't break `doc --stage 0` and is strictly closer to the previous behavior. Previously, rustdoc would error with strange issues because of the mismatched sysroot: ``` error[E0460]: found possibly newer version of crate `std` which `rustc_span` depends on --> /home/jnelson/rust-lang/rust/compiler/rustc_lint_defs/src/lib.rs:14:5 | 14 | use rustc_span::{sym, symbol::Ident, Span, Symbol}; | ^^^^^^^^^^ | = note: perhaps that crate needs to be recompiled? = note: the following crate versions were found: crate `std`: /home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-ff9290e971253a38.rlib crate `std`: /home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-ff9290e971253a38.so crate `rustc_span`: /home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_span-ed11dce30c1766f9.rlib ```
…Simulacrum Fix `x test --doc --stage 0 library/std` I managed to break this in rust-lang#95449. I am not quite sure why this is the correct fix, but it doesn't break `doc --stage 0` and is strictly closer to the previous behavior. Previously, rustdoc would error with strange issues because of the mismatched sysroot: ``` error[E0460]: found possibly newer version of crate `std` which `rustc_span` depends on --> /home/jnelson/rust-lang/rust/compiler/rustc_lint_defs/src/lib.rs:14:5 | 14 | use rustc_span::{sym, symbol::Ident, Span, Symbol}; | ^^^^^^^^^^ | = note: perhaps that crate needs to be recompiled? = note: the following crate versions were found: crate `std`: /home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-ff9290e971253a38.rlib crate `std`: /home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-ff9290e971253a38.so crate `rustc_span`: /home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_span-ed11dce30c1766f9.rlib ```
@bors p=1 - this is breaking various things for local development |
@jyn514: 🔑 Insufficient privileges: not in try users |
@bors p=1 |
☀️ Test successful - checks-actions |
Finished benchmarking commit (2fa9789): comparison url. Summary:
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
This reverts the temporary fix implemented by rust-lang#95993 since a permanent fix has been implemented by rust-lang/cargo#10594
…Mark-Simulacrum Revert rust-lang#95993 fix This reverts the temporary fix implemented by rust-lang#95993 since a permanent fix has been implemented by rust-lang/cargo#10594 Fixes rust-lang#98728
I managed to break this in #95449.
I am not quite sure why this is the correct fix, but it doesn't break
doc --stage 0
and is strictly closer to the previous behavior.
Previously, rustdoc would error with strange issues because of the mismatched sysroot: