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

Inconsistency between Clippy and Rustdoc build stages #92538

Open
Aaron1011 opened this issue Jan 3, 2022 · 2 comments
Open

Inconsistency between Clippy and Rustdoc build stages #92538

Aaron1011 opened this issue Jan 3, 2022 · 2 comments
Labels
A-clippy Area: Clippy C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@Aaron1011
Copy link
Member

If I run:

./x.py build src/tools/rustdoc --stage 1

Then I get a rustdoc built against my local stage1 compiler

However, if I run:

./x.py build src/tools/clippy --stage 1

Then bootstrap will attempt to build a stage2 compiler, and compile Clippy against it. In order to get the same result as with Rustdoc, I need to use ./x.py build src/tools/clippy --stage 0

As far as I know, both Clippy and Rustdoc are both the same 'kind' of tool (they are a frontend that runs some of the compiler's passes), so --stage N should give the same result with both of them.

@Aaron1011 Aaron1011 added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) C-bug Category: This is a bug. A-clippy Area: Clippy labels Jan 3, 2022
bors added a commit to rust-lang-ci/rust that referenced this issue Apr 8, 2022
Fix `x test src/tools/error_index_generator --stage {0,1}`

There were two fixes needed:
1. Use `top_stage` instead of `top_stage - 1`. There was a long and torturous comment about trying to match rustdoc's version, but it works better without the hard-coding than with (before it gave errors that `libtest.so` couldn't be found).
2. Make sure that `ci-llvm/lib` is added to LD_LIBRARY_PATH. Previously the error index would be unable to load LLVM for stage0 builds.

At some point we should probably have a discussion about how rustdoc stages should be numbered;
confusion between 0/1/2 has come up several times in bootstrap now. cc rust-lang#92538

Note that this is still broken when using `download-rustc = true` and `--stage 1`,
but that's *really* a corner case and should affect almost no one. `--stage {0,2}`
work fine with download-rustc.

Fixes rust-lang#80096.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-clippy Area: Clippy C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants