-
Notifications
You must be signed in to change notification settings - Fork 277
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
build: migrate clang-tidy to LLVM 16 #3028
Conversation
9b37d03
to
c239979
Compare
You might want to also apply CleverRaven/Cataclysm-DDA#66315 and CleverRaven/Cataclysm-DDA#66538 which are follow-ups to CleverRaven/Cataclysm-DDA#65806. |
thank you! will try tomorrow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some checks definitely need to be disabled. The tidy runner seems to be timing out because of the sheer amount of new warnings.
originally added compiledb but removed them on rebase as it was unnecessary. see: cataclysmbnteam#3028 (comment) see: cataclysmbnteam#3028 (comment) Co-authored-by: Olanti <[email protected]>
see: cataclysmbnteam#3028 (comment) see: cataclysmbnteam#3028 (comment) see: cataclysmbnteam#3028 (comment) Co-authored-by: Olanti <[email protected]>
see: cataclysmbnteam#3028 (comment) Co-authored-by: Olanti <[email protected]>
see: cataclysmbnteam#3028 (comment) see: cataclysmbnteam#3028 (comment) see: cataclysmbnteam#3028 (comment) see: cataclysmbnteam#3028 (comment) see: cataclysmbnteam#3028 (comment) see: cataclysmbnteam#3028 (comment) see: cataclysmbnteam#3028 (comment) Co-authored-by: Olanti <[email protected]>
see: cataclysmbnteam#3028 (comment) see: cataclysmbnteam#3028 (comment) see: cataclysmbnteam#3028 (comment) Co-authored-by: Olanti <[email protected]>
see: cataclysmbnteam#3028 (comment) Co-authored-by: Olanti <[email protected]>
see: cataclysmbnteam#3028 (comment) see: cataclysmbnteam#3028 (comment) see: cataclysmbnteam#3028 (comment) see: cataclysmbnteam#3028 (comment) see: cataclysmbnteam#3028 (comment) see: cataclysmbnteam#3028 (comment) see: cataclysmbnteam#3028 (comment) Co-authored-by: Olanti <[email protected]>
b6e7964
to
b9cf37e
Compare
ported from: CleverRaven/Cataclysm-DDA#65381 Co-authored-by: Binrui Dong <[email protected]> Co-authored-by: John Bytheway <[email protected]> Co-authored-by: Jianxiang Wang (王健翔) <[email protected]>
ported from: CleverRaven/Cataclysm-DDA#56506 Co-authored-by: Co-authored-by: Jianxiang Wang (王健翔) <[email protected]>
ported from: CleverRaven/Cataclysm-DDA#65806 Co-authored-by: Co-authored-by: John Bytheway <[email protected]>
originally added compiledb but removed them on rebase as it was unnecessary. see: cataclysmbnteam#3028 (comment) see: cataclysmbnteam#3028 (comment) Co-authored-by: Olanti <[email protected]>
see: cataclysmbnteam#3028 (comment) see: cataclysmbnteam#3028 (comment) see: cataclysmbnteam#3028 (comment) Co-authored-by: Olanti <[email protected]>
removed as they were dead code and causing run failure in local machine see: jbytheway/Cataclysm-DDA@866afce#diff-f333e72625612c970e8c39f810460634e7d2b73ab99f89066c11868cbb189dbf
temporarily disabled 'check all affected files' for now (three header changed in this PR affects entire .cpp) |
There was a problem hiding this comment.
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 work at all now.
aww, fixed. do you think it'd be ok to temporarily disable checking all affected source files and only run clang-tidy on changed files? |
If you mean, disable checking C++ compilers (and clang-tidy checks by extension) need the entire preprocessed file to work with, and preprocessed file is created from If that "affected files" check was disabled, then one PR could introduce error in header file that's only apparent when analyzing together with relevant .cpp, but CI would accept that, and then some other PR that happens to (correctly) modify that .cpp in a different place would trigger the check and get yelled at for no reason. |
As I've mentioned before, you should start with fixing and/or disabling the checks added in this PR. If you check the build logs, the new checks spew billions upon billions of repeating errors, so it's quite possible the build times out simply because clang spends most of the time formatting error output. BN builds 2-3 times faster than DDA, I say it's safe to expect our tidy could also run 2-3 times faster. |
a few days ago i tried disabling all new checks and still stumbled across 360m limit, as ref #3113: changed file detection relies on makefile |
This reverts commit 41402ae.
for some reason they seem to work and they look better
every new checks are disabled but it still hits time limit. this time limit hit is specifically caused due to changes in aforementioned 3 headers. which caused clang-tidy to run checks for every source files. i think this PR should be merged despite that, as
|
I strongly disagree. Tidy job works fine, while this PR in its current state breaks it completely. Running tidy locally should not be a priority over running it in CI, because nobody runs it locally except when they're working on some tidy issue, but CI runs it for all C++ changes. There's no immediate need to upgrade to tidy + LLVM 16, this PR is not a blocker for anything, it should be a self-contained upgrade, not downgrade. If you claim you've disabled all the new checks and still it times out, takes more than 6 hours to complete, but at the current state of things tidy works and takes less than 2 hours for the entire run on all files, where does the >3 times increase come from? |
keeping it draft until #2250 to reduce cognitive load |
Summary
SUMMARY: Infrastructure "DDA Port: migrate clang-tidy plugin to LLVM 16"
Purpose of change
Make it easier to get custom clang-tidy plugin easier on local environment.
Describe the solution
ported following PRs:
all credits to: @BrettDong @jbytheway @Qrox
Describe alternatives you've considered
RIIR
Testing
confimed it was possible to use plugin built with local LLVM 16. CI may need to be adjusted a lot since i've patchworked a lot of files.
also lots of new checks are disabled as they were too time consuming and killed runners due to 6h limit. will be handled in separate PRs.