-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ensure compiler existance of tools on the dist step #140006
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
Signed-off-by: onur-ozkan <work@onurozkan.dev>
r? @clubby789 rustbot has assigned @clubby789. Use |
@@ -421,13 +421,13 @@ impl Step for Rustc { | |||
builder.install(&rustdoc, &image.join("bin"), FileType::Executable); | |||
} | |||
|
|||
let ra_proc_macro_srv_compiler = | |||
builder.compiler_for(compiler.stage, builder.config.build, compiler.host); | |||
builder.ensure(compile::Rustc::new(ra_proc_macro_srv_compiler, compiler.host)); |
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.
Doesn't this now build the compiler for the proc macro server even if tool::RustAnalyzerProcMacroSrv
should not actually be built? 🤔 It's not always enabled.
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.
Compiler is passed before the condition here so I'm not sure how to guard against that without applying ugly hacks. Also, in practice, I don't think we ever hit the case of "trying to build RustAnalyzerProcMacroSrv
while the compiler isn't compiled/ready for use".
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.
Ok, fair enough.
Signed-off-by: onur-ozkan <work@onurozkan.dev>
@bors try |
1 similar comment
@bors try |
ensure compiler existance of tools on the dist step Fixes rust-lang#138778 with a coverage on rust-lang#138123 and rust-lang#138004. try-job: dist-powerpc64le-linux
☀️ Try build successful - checks-actions |
It seems like the exact same bootstrap steps were executed in |
Why do you expect this PR to reduce executed steps? It's not the goal here. |
Yeah. |
I see. Hmm, I don't like this approach though, it's super brittle. The fact that we have to sprinkle these ensure calls sucks. Could we instead move the |
There is no simple solution we can do in |
Well, I would argue that adding So why are these specific tools for which you added |
Seems like we have completely different understanding of what hack really means. Current diff doesn't do anything other than preparing the compiler for the compiler tool and it's obvious for why we doing it. It can look unpleasant but IMO it's definitely not a hack for sure.
You can use as many If you want to fix this in a different way, you would either re-write/remove |
Yeah, I have that in my TODO list, because the current system makes it too easy to make a mistake. But it will be quite hard to modify. And it shouldn't happen before the stage 0 redesign lands anyway :) Anyway, you can r=me, there's no need to block this fix PR on a larger refactoring. |
@bors r+ |
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#137653 (Deprecate the unstable `concat_idents!`) - rust-lang#138957 (Update the index of Option to make the summary more comprehensive) - rust-lang#140006 (ensure compiler existance of tools on the dist step) - rust-lang#140143 (Move `sys::pal::os::Env` into `sys::env`) - rust-lang#140202 (Make #![feature(let_chains)] bootstrap conditional in compiler/) - rust-lang#140236 (norm nested aliases before evaluating the parent goal) - rust-lang#140257 (Some drive-by housecleaning in `rustc_borrowck`) - rust-lang#140278 (Don't use item name to look up associated item from trait item) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#140006 - onur-ozkan:138778, r=onur-ozkan ensure compiler existance of tools on the dist step Fixes rust-lang#138778 with a coverage on rust-lang#138123 and rust-lang#138004. try-job: dist-powerpc64le-linux
Fixes #138778 with a coverage on #138123 and #138004.
try-job: dist-powerpc64le-linux