Skip to content

bootstrap: force download-rustc=if-unchanged even if settings differ #141953

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

Open
RalfJung opened this issue Jun 3, 2025 · 8 comments · May be fixed by #142054
Open

bootstrap: force download-rustc=if-unchanged even if settings differ #141953

RalfJung opened this issue Jun 3, 2025 · 8 comments · May be fixed by #142054
Labels
A-download-rustc Area: The `rust.download-rustc` build option. C-enhancement Category: An issue proposing an enhancement or a PR with one. E-needs-design This issue needs exploration and design to see how and if we can fix/implement it 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

I'd like to have debug assertions enabled for local rustc builds, but if I didn't change rustc then I am okay with just downloading the prebuilt rustc even if it does not have debug assertions. I'll hopefully only have to debug rustc if I actually changed it. :)

Would be nice to have a way to force the download even if settings differ.

@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
@Kobzol Kobzol added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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
@jyn514
Copy link
Member

jyn514 commented Jun 5, 2025

@rustbot label A-download-rustc T-bootstrap

@jieyouxu
Copy link
Member

jieyouxu commented Jun 5, 2025

I'd like to have debug assertions enabled for local rustc builds, but if I didn't change rustc then I am okay with just downloading the prebuilt rustc even if it does not have debug assertions. I'll hopefully only have to debug rustc if I actually changed it. :)

Note that compiletest has no other way other than relying on bootstrap to provide info about whether the rustc under test is built with debug assertions. So even if the forcing CI rustc option is specified, ./x test on tests/ either has to fail, or skip tests that require debug assertions (among other cases whether CI rustc differs with actual local rustc config). Skipping seems sketchy.

Or, is the proposed force behavior only for check/build cases?

@RalfJung
Copy link
Member Author

RalfJung commented Jun 5, 2025

Ah, good point.

I will probably not run the compiler tests if I didn't change the compiler. So having it just refuse to run them would be fine. But I can see how that gets messy...

Or, is the proposed force behavior only for check/build cases?

It's also for "run library tests", but not for "run compiler tests".

@jieyouxu
Copy link
Member

jieyouxu commented Jun 5, 2025

Yeah, which is why that seems a bit tricky (cuz if you only fail the build for tests/ that also feels self-inconsistent).

It's also for "run library tests", but not for "run compiler tests".

To make matters worse, note that we have some library tests within tests/ because its hard to write as library/ unit/crate tests 😆. But yeah, I see what you mean re. library/ tests.

@RalfJung
Copy link
Member Author

RalfJung commented Jun 5, 2025

note that we have some library tests within tests/ because its hard to write as library/ unit/crate tests

When I said "library tests" I meant "tests in library/". :)

@jieyouxu
Copy link
Member

jieyouxu commented Jun 5, 2025

(Yes, I added the clarification with an edit but raced with you)

@jieyouxu jieyouxu added the C-discussion Category: Discussion or questions that doesn't represent real issues. label Jun 5, 2025
@jieyouxu
Copy link
Member

jieyouxu commented Jun 5, 2025

I will probably not run the compiler tests if I didn't change the compiler. So having it just refuse to run them would be fine. But I can see how that gets messy...

This is also kinda tricky from a UX perspective. Because then, you can have a set of configuration options which works for ./x {check,build} or even ./x test library/, but which becomes rejected by ./x test tests/ only when you try to run it 🤔

@RalfJung
Copy link
Member Author

RalfJung commented Jun 5, 2025

Yeah it's not trivial.^^

For now I changed my settings, I rarely need debug assertions. This is not high priority. But once the dust settles around the transition, maybe we can find a way to find more ergonomic ways for working with debug assertions occasionally.

@jieyouxu jieyouxu added C-enhancement Category: An issue proposing an enhancement or a PR with one. E-needs-design This issue needs exploration and design to see how and if we can fix/implement it and removed C-discussion Category: Discussion or questions that doesn't represent real issues. labels Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-download-rustc Area: The `rust.download-rustc` build option. C-enhancement Category: An issue proposing an enhancement or a PR with one. E-needs-design This issue needs exploration and design to see how and if we can fix/implement it 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.

5 participants