-
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
Fix x build library/std compiler/rustc
#99130
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
RustcLink presumably needs the same treatment? |
ah, good call - not sure how you could trigger this for RustcLink, since it's only called from |
Previously, this was broken because of improper caching: 1. `StepDescription::maybe_run` builds `Compile::Std`, which only built `std` and not `proc_macro` 1. `Std` calls `builder.ensure(StdLink)` 1. `Rustc` calls `ensure(Std)`, which builds all crates, including `proc_macro` 1. `Rustc` calls `ensure(StdLink)`. `ensure` would see that it had already been run and do nothing. <-- bug is here 1. Cargo gives an error that `proc_macro` doesn't exist. This fixes the caching by adding `crates` to `StdLink`, so it will get rerun if the crates that are built change. This also does the same for `RustcLink`; it doesn't matter in practice currently because nothing uses it except `impl Step for Rustc`, but it will avoid bugs if we start using it in the future (e.g. to build individual crates for rustfmt).
587ea8b
to
7d4bd54
Compare
@bors r+ rollup p=5 (breaking builds for folks in practice) |
@Mark-Simulacrum I don't think https://rust-lang.zulipchat.com/#narrow/stream/247081-t-compiler.2Fperformance/topic/NIghtly.20bustage.3F is actually related - the problem there is that |
Yes, I agree, but I think this is still something we should fix fairly quickly; maybe @bors p=1 though. |
☀️ Test successful - checks-actions |
Finished benchmarking commit (a51fb2b): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesThis benchmark run did not return any relevant results for this metric. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
Previously, this was broken because of improper caching:
StepDescription::maybe_run
buildsCompile::Std
, which only builtstd
and notproc_macro
Std
callsbuilder.ensure(StdLink)
Rustc
callsensure(Std)
, which builds all crates, includingproc_macro
Rustc
callsensure(StdLink)
.ensure
would see that it had already been run and do nothing. <-- bug is hereproc_macro
doesn't exist.This fixes the caching by adding
crates
toStdLink
, so it will get rerun if the crates that are built change.Fixes #99129.