Skip to content

Conversation

nnethercote
Copy link
Contributor

When I run tidy I currently get output like this:

Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.06s
Building stage1 tidy (stage0 -> stage1, x86_64-unknown-linux-gnu)
    Finished `release` profile [optimized + debuginfo] target(s) in 0.16s
fmt check
fmt: skipped 374 untracked files
fmt info: No modified files detected for formatting.
tidy check
Checking tidy rustdoc_json...
No error code explanation was removed!
`rustdoc-json-types` was not modified.
x.py completions check
Build completed successfully in 0:00:06

Several of these output lines seem unnecessary. E.g. there are lots of different tidy tests, why do a couple of them print output saying that they don't need to do anything?

r? @GuillaumeGomez

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Sep 7, 2025
@nnethercote
Copy link
Contributor Author

I think the first two commits should be uncontroversial, because they are about individual tidy checks that are noisy. The third one I'm less sure about, because it's removing top-level tidy progress indicators.

@@ -95,7 +95,6 @@ fn check_removed_error_code_explanation(ci_info: &crate::CiInfo, bad: &mut bool)
eprintln!("Take a look at E0001 to see how to handle it.");
return;
}
println!("No error code explanation was removed!");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These messages are useful, especially in regression checks later on if this code because outdated (ie, how error codes are handled changed).

@@ -16,7 +15,6 @@ pub fn check(src_path: &Path, ci_info: &crate::CiInfo, bad: &mut bool) {
// First we check that `src/rustdoc-json-types` was modified.
if !crate::files_modified(ci_info, |p| p == RUSTDOC_JSON_TYPES) {
// `rustdoc-json-types` was not modified so nothing more to check here.
println!("`rustdoc-json-types` was not modified.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

@Kobzol
Copy link
Member

Kobzol commented Sep 8, 2025

I also agree that the messages that say that something was checked are quite useful, because tidy actually has a lot of optional functionality (--extra-checks), and I sometimes wonder which things were checked/executed or not.

What I think we could improve though is the error message when something bad actually happens, because that is sometimes a bit drowned in the rest of the text. So the errors should BE LOUD AND VISIBLE, so that you can always quickly find out if an error happened or not. Maybe tidy also say something like "everything was fine" at the very end, ideally printed in green, to help us figure out if the result was ok or not.

@camsteffen
Copy link
Contributor

If you have a message per step, I think I'd slightly prefer to have "Checking x..." at the start of the step than have "x is good" at the end of the step.

@nnethercote
Copy link
Contributor Author

Well, I guess my intution about this is off.

@nnethercote nnethercote closed this Sep 8, 2025
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants