Skip to content

internal: Utilize cargo check --compile-time-deps #20047

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

Merged
merged 1 commit into from
Jun 21, 2025

Conversation

ShoyuVanilla
Copy link
Member

@ShoyuVanilla ShoyuVanilla commented Jun 19, 2025

rust-lang/cargo#15674 has been merged and I guess it would be available in toolchain 1.90.0

I've tested this on rust-analyzer itself with cargo binary built from current master with the following my rust-analyzer branch
https://github.com/ShoyuVanilla/rust-analyzer/tree/comp-time-deps-test
and these are the results (I had run cargo clean before each run and modified the code a bit to use --compile-time-deps with injected cargo binary path iff env var $CARGO_BIN_FOR_TEST is set)

With --compile-time-deps

image

Without --compile-time-deps

image

Comparison

analysis-stat results Time target dir size
--compile-time-deps Identical 2m 25s 347 M
default Identical 2m 55s 1.4 G

System Information

image

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 19, 2025
@lnicola
Copy link
Member

lnicola commented Jun 19, 2025

😍

@edwin0cheng
Copy link
Member

Do we want to disable RUSTC_WRAPPER too ?

@Veykril
Copy link
Member

Veykril commented Jun 21, 2025

We should not set the wrapper if we use the flag

@ShoyuVanilla
Copy link
Member Author

Do we want to disable RUSTC_WRAPPER too ?

Oh, I missed it. Thanks!

@Veykril
Copy link
Member

Veykril commented Jun 21, 2025

This is amazing, can't wait to get rid of the wrapper in the future

@Veykril Veykril added this pull request to the merge queue Jun 21, 2025
Merged via the queue into rust-lang:master with commit 56de211 Jun 21, 2025
14 checks passed
@ShoyuVanilla ShoyuVanilla deleted the comp-time-deps branch June 21, 2025 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants