Skip to content

Suggested workflow for vscode check-on-save can lead to surprisingly expensive check builds #141955

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

Closed
RalfJung opened this issue Jun 3, 2025 · 0 comments · Fixed by #141970
Closed
Labels
A-contributor-roadblock Area: Makes things more difficult for new or seasoned contributors to Rust T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@RalfJung
Copy link
Member

RalfJung commented Jun 3, 2025

With the stage 0 redesign, ./x check now (sometimes?) defaults to stage 1. If a downloaded rustc cannot be used, this command is quite expensive: it does a full rustc build, and then checks everything! That's not what users expect from a check build (which is supposed to be quick). It's also bad when you are on battery -- it's a nasty surprise when you realize that just opening vscode sucked up 8% of your battery as it did a full rustc build.

I don't know what the best fix here, but I think it is a hard requirement for the suggested check-on-save command that it never does an actual full compiler build. This was true with the old staging, and we should make sure it becomes true again.

@RalfJung RalfJung added the C-bug Category: This is a bug. label Jun 3, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jun 3, 2025
@onur-ozkan onur-ozkan added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) A-contributor-roadblock Area: Makes things more difficult for new or seasoned contributors to Rust and removed C-bug Category: This is a bug. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jun 3, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jun 5, 2025
implement new `x` flag: `--skip-std-check-if-no-download-rustc`

One of our developers (`@RalfJung)` [reported](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Surprising.20stages.20for.20check.20build.20after.20stage.20reorg/with/521925606)[#t-infra/bootstrap > Surprising stages for check build after stage reorg](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Surprising.20stages.20for.20check.20build.20after.20stage.20reorg/with/521925606) that working on both the compiler and the library simultaneously with RA enabled is extremely difficult because checking library creates a heavy load on machines (by building stage1 compiler) on each modification. `--skip-std-check-if-no-download-rustc` flag is intended to reduce this heavy load on their IDE integration as much as possible.

Fixes: rust-lang#141955
@bors bors closed this as completed in cfe78d9 Jun 5, 2025
rust-timer added a commit that referenced this issue Jun 5, 2025
Rollup merge of #141970 - onur-ozkan:skip-stage1-std, r=Kobzol

implement new `x` flag: `--skip-std-check-if-no-download-rustc`

One of our developers (``@RalfJung)`` [reported](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Surprising.20stages.20for.20check.20build.20after.20stage.20reorg/with/521925606)[#t-infra/bootstrap > Surprising stages for check build after stage reorg](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Surprising.20stages.20for.20check.20build.20after.20stage.20reorg/with/521925606) that working on both the compiler and the library simultaneously with RA enabled is extremely difficult because checking library creates a heavy load on machines (by building stage1 compiler) on each modification. `--skip-std-check-if-no-download-rustc` flag is intended to reduce this heavy load on their IDE integration as much as possible.

Fixes: #141955
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-contributor-roadblock Area: Makes things more difficult for new or seasoned contributors to Rust T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants