-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Improve the rustc-side clippy development experience #76495
Copy link
Copy link
Open
Labels
A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustArea: Makes things more difficult for new or seasoned contributors to RustA-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.Category: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-clippyRelevant to the Clippy team.Relevant to the Clippy team.
Metadata
Metadata
Assignees
Labels
A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustArea: Makes things more difficult for new or seasoned contributors to RustA-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.Category: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-clippyRelevant to the Clippy team.Relevant to the Clippy team.
Type
Fields
Give feedbackNo fields configured for issues without a type.
When working on #75573, I ended up needing to modify Clippy (both a lint implementation and some UI tests). This process left a lot to be desired, and could be a significant roadblock to new contributors. I came up with some ideas for improving the process:
./x.py test src/tools/clippyrequires a full compiler bootstrap (e.g. building a stage2 compiler). This takes a significant amount of time, and interacts badly with incremental compilation. For contributors with lower-end machines, this may make the contribution process incredibly frustrating. Attempting to build Clippy against a stage1 compiler (which requires running./x.py test src/tools/clippy --stage 0for some reason) works, but the tests fail with a confusing error about LLVM being missing../x.py test --bless. Currently, blessing Clippy UI tests requires manually running scripts from insidesrc/tools/clippy. It would be nice if./x.py test --blessworked on all UI tests, allowing Clippy to be largely treated as 'just another directory'.-D warningsand Clippy lints. It seems as though denying a built-in lint with-D warningsprevents Clippy lints from being run. Since Clippy UI tests are run with-D warnings, adding a new builtin Rust lint can end up preventing Clippy UI tests from testing Clippy lints. Ideally, we would allow both sets of lints to run - if this is not possible, we should document the workaround (adding#![allow(problematic_rustc_lint)]to the affected Clippy UI tests).