Skip to content
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

Delete the stage1 and stage0-sysroot directories when using download-rustc #102002

Closed
jyn514 opened this issue Sep 19, 2022 · 2 comments · Fixed by #102025
Closed

Delete the stage1 and stage0-sysroot directories when using download-rustc #102002

jyn514 opened this issue Sep 19, 2022 · 2 comments · Fixed by #102025
Assignees
Labels
A-download-rustc Area: The `rust.download-rustc` build option. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@jyn514
Copy link
Member

jyn514 commented Sep 19, 2022

@camelid: I just ran into something confusing with download-rustc: normal x.py build will build rustdoc and put it in stage1. However, x.py build with download-rustc enabled will put it in stage2. This means that rustdoc +stage1 ... won't run my local, modified version of rustdoc if download-rustc is set. Specifically, rustdoc +stage1 ... seems to run nightly rustdoc (or something static).

@bjorn3 suggests deleting the stage1 and stage0-sysroot directories when using download-rustc, to avoid caching issues like this. rustdoc +stage1 still won't do the right thing, but it will at least give a hard error instead of silently using the wrong version.

Originally posted by @jyn514 in #81930 (comment)

@jyn514 jyn514 added the E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. label Sep 19, 2022
@jyn514
Copy link
Member Author

jyn514 commented Sep 19, 2022

Mentoring instructions: in https://github.com/rust-lang/rust/blob/405f0c21608cb41aabc512eed73b2ff707391cab/src/bootstrap/compile.rs#L1115-L1126 delete the sysroots stage1 and stage0-sysroot folders, not just the current sysroot.

Some background info: https://rustc-dev-guide.rust-lang.org/building/bootstrapping.html#what-is-a-sysroot

@jyn514 jyn514 added E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Sep 19, 2022
@chenyukang
Copy link
Member

@rustbot claim

bors added a commit to rust-lang-ci/rust that referenced this issue Oct 7, 2022
Delete the stage1 and stage0-sysroot directories when using download-rustc

Fixes rust-lang#102002
@bors bors closed this as completed in 973ff03 Oct 7, 2022
@jyn514 jyn514 added the A-download-rustc Area: The `rust.download-rustc` build option. label Jun 26, 2023
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. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. 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.

2 participants