-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Is there an existing issue for this?
- I have searched the existing infra issues
Type of Request
feature request
Infrastructure Environment
I'm not sure (partially Goma -> RBE, but potentially other improvements as well)
What is happening?
Background
Clang Tidy is a critical component to the Flutter engine - it provides style guide enforcement, and even catches critical performance-lints (like copying expensive objects that should be moved instead in C++). As of #48145, we now run Clang Tidy on all C++ source and header files.
Problem
Clang Tidy (with the lints we've chosen to enable) is slow.
There is unfortunately a lot of complaints on the web that indicate to me it's a wide problem:
My workplace had such a debacle with clang-tidy that we had to disable it in a PR's CI...
(https://www.reddit.com/r/cpp_questions/comments/10jx0uc/clang_tidy_is_very_slow_when_using_headers_like/)
As a result, we've created a lot of complexity (and are considering more) to defer and shard Clang Tidy:
- Separate pre and post submit checks for clang_tidy per-platform
- An option, currently unused, to shard
Ideas
I don't have a concrete suggestion, but I'm opening this issue to discuss one. Some ideas:
- Use something like ctccache
- Hope that the migration to RBE (and Reclient) provides adequate caching
Steps to reproduce
No response
Expected results
We can get rid of the post-submit, and always run the full set of Clang Tidy on pre-submit