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

x.py test src/tools/clippy shouldn't build rustdoc #84036

Closed
jyn514 opened this issue Apr 9, 2021 · 5 comments
Closed

x.py test src/tools/clippy shouldn't build rustdoc #84036

jyn514 opened this issue Apr 9, 2021 · 5 comments
Labels
A-clippy Area: Clippy A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@jyn514
Copy link
Member

jyn514 commented Apr 9, 2021

I tried this code: x.py test src/tools/clippy
I expected to see this happen: bootstrap builds the compiler and clippy
Instead, this happened: bootstrap builds the compiler, clippy, and rustdoc

Meta

git merge-base HEAD origin/master is 69e1d22

@jyn514 jyn514 added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) C-bug Category: This is a bug. A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself A-clippy Area: Clippy labels Apr 9, 2021
@ehuss
Copy link
Contributor

ehuss commented Apr 9, 2021

This is normal for running x.py test, since it runs doctests on the libraries.

You can pass --no-doc to skip building rustdoc.

@jyn514
Copy link
Member Author

jyn514 commented Apr 10, 2021

@ehuss do you know why it uses the in-tree rustdoc instead of the bootstrap compiler? I was using --stage 1.

@ehuss
Copy link
Contributor

ehuss commented Apr 12, 2021

The tests run with the in-tree rustc (stage1), which will also require using the in-tree rustdoc (stage1). Using stage0 rustdoc would be testing against an older version, and I don't think would necessarily work.

I'd imagine nobody considered it when clippy was brought in-tree, since that is all determined at a low level inside rustbuild.

However, taking a closer look, it appears that clippy doesn't have any doctests, so I imagine defaulting that to off would be reasonable (assuming clippy never intends to add doctests in the future). It looks like rustbuild does not make that easy since it is a property of the Builder, so it would require some work to support that.

@jyn514
Copy link
Member Author

jyn514 commented Apr 12, 2021

The tests run with the in-tree rustc (stage1), which will also require using the in-tree rustdoc (stage1). Using stage0 rustdoc would be testing against an older version, and I don't think would necessarily work.

Ok, I see the issue - this is using the "test with stage 1" meaning, not "build stage 1 and test it" like I thought (the first builds compiler/ twice, the second only once). test --stage 0 src/tools/clippy seems to be broken because of weird things with clippy's copy of compiletest: #78717.

However, taking a closer look, it appears that clippy doesn't have any doctests,

I see some in clippy_lints:

@jyn514 jyn514 closed this as completed Apr 12, 2021
@ehuss
Copy link
Contributor

ehuss commented Apr 12, 2021

x.py test src/tools/clippy does not run any tests on clippy_lints. It only tests the integration tests in the tests directory. rust-lang/rust only does a subset of clippy's full suite of tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-clippy Area: Clippy A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

2 participants