-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Add --compile-time-deps argument for x check #143785
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
base: master
Are you sure you want to change the base?
Conversation
r? @clubby789 rustbot has assigned @clubby789. Use |
This PR modifies If appropriate, please update |
dc7dab3
to
6f2d900
Compare
This reduces the amount of time it takes to do the x check for rust-analyzer analysis from 12m16s to 3m34s when the bootstrap compiler is already downloaded.
6f2d900
to
3fe3edb
Compare
This saves about 30s.
r? @Kobzol I don't use RA much, so could you please walk me through what exactly this does? I know that RA/RustRover wanted this flag to only compile proc macros and compile + run build scripts to speed up the initial analysis of the crate. In RustRover it's not that critical, because it caches stuff heavily. If I understand it correctly, RA doesn't cache stuff between executions, so if you reopen the rustc project, it has to do |
Basically you're correct but there are two things to clarify:
|
I see. So it only helps if you open RA after clearing the |
Yes
That would hurt working on things other than rustc, like clippy, miri or rustfmt. |
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.
Could you please add a change_tracker.rs
entry with Info
level about this?
@@ -2542,6 +2542,11 @@ pub fn stream_cargo( | |||
} | |||
cmd.arg("--message-format").arg(message_format); | |||
|
|||
if builder.config.compile_time_deps { | |||
cmd.arg("-Zunstable-options"); | |||
cmd.arg("--compile-time-deps"); |
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.
Could you please add a brief comment here, explaining what the flag does. Also I would move this into Builder::cargo
, in stream_cargo
we shouldn't be doing large modifications to the Cargo command anymore, we only configure output diagnostics and message format (which are actually related to streaming).
Together with skipping building C++ code in rustc_llvm for check, this reduces the amount of time it takes to do the x check for rust-analyzer analysis from 12m16s to 3m06s when the bootstrap compiler is already downloaded.