Skip to content

run tidy's style check from the root path #110316

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

Closed
wants to merge 1 commit into from

Conversation

Ezrashaw
Copy link
Contributor

See https://github.com/rust-lang/rust/pull/110307/files#r1166327524.

🤞 the change in RELEASES.md is ok? maybe cc @Mark-Simulacrum

@rustbot
Copy link
Collaborator

rustbot commented Apr 14, 2023

r? @Mark-Simulacrum

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc 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) T-release Relevant to the release subteam, which will review and decide on the PR/issue. labels Apr 14, 2023
@Ezrashaw
Copy link
Contributor Author

rustbot can read my mind!

Comment on lines -113 to -116
check!(style, &src_path);
check!(style, &tests_path);
check!(style, &compiler_path);
check!(style, &library_path);
Copy link
Member

@the8472 the8472 Apr 14, 2023

Choose a reason for hiding this comment

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

Note that by applying the check separately we're getting parallelism. I suspect that this will make tidy slower since style is one of the longer-running tasks.

Can you benchmark this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It doesn't seem to be any worse (no numbers). On the roadmap for tidy is file-level parallelism in walk which would alleviate any possible perf regressions.

Copy link
Member

Choose a reason for hiding this comment

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

Can you measure the performance? Something like hyperfine may help there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I'm on holiday right now and only have access to my laptop (which can barely run x test tidy in the first place lol). I will note that it's not noticeably different but I have no benchmarks to confirm that at the micro-scale.

Copy link
Member

Choose a reason for hiding this comment

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

Without this patch: 2.2 seconds, with this patch: 2.6 seconds (results consistent across two systems, one with macOS the other with Linux). I personally don't really pay super close attention to tidy test times, but I believe folks are running it in e.g. commit hooks so this might be significant. @the8472 do you have an opinion on this?

Copy link
Member

Choose a reason for hiding this comment

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

So the intent here is to just get README.md under tidy control? If so then spending 0.4 seconds more on just that seems a bit much. And yes I run tidy while rebasing so the extra wait can be a bit annoying.

Would it work to add README.md as additional root point for the traversal?

On the roadmap for tidy is file-level parallelism in walk which would alleviate any possible perf regressions.

If it's on the radar I won't object strongly to have this merged but if we can achieve the goal without the loss it would still be preferable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So the intent here is to just get README.md under tidy control?

Well, more than just README.md, all the other files from the root directory which aren't in the well-defined directories (for instance the RELEASES.md formatting issue was caught here; as well as something which I put in another PR I think).

Copy link
Member

Choose a reason for hiding this comment

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

Ah sorry, yes, I meant RELEASES.md

Copy link
Member

Choose a reason for hiding this comment

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

Anyway, if we can somehow avoid putting everything into a single task instead add a way to only capture the additional files at the root level (e.g. globbing /* but not /**/*?) then that'd help with the performance issue.

@Mark-Simulacrum
Copy link
Member

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 19, 2023
@JohnCSimon
Copy link
Member

@Ezrashaw
ping from triage - can you post your status on this PR? There hasn't been an update in a few months. Thanks!

FYI: when a PR is ready for review, send a message containing
@rustbot ready to switch to S-waiting-on-review so the PR is in the reviewer's backlog.


@Dylan-DPC
Copy link
Member

Closing this as inactive. Feel free to reöpen this pr or create a new pr if you get the time to work on this. Thanks

@Dylan-DPC Dylan-DPC closed this Aug 8, 2023
@Dylan-DPC Dylan-DPC added S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 8, 2023
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 S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-release Relevant to the release subteam, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants