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
Manage the include hell #3379
Comments
Example results when running
|
👍 from me. I tested the same tool a few weeks ago and it looked useful. The first item in your list seems like a good first issue too, though it might need the disclaimer "(for someone familiar with compiling)". |
#3454 is another example of this being useful - running iwyu over |
Follow-up from #3377
Problem statement
We often run into issues where we (or upstream) naively included or didn't include headers. This basically is hidden tech debt, and although over the past 3 years, we needed less than 5 fixes per year, these do block whomever is using newer compilers or dependencies than we release for, sometimes for prolonged time.
Potential solution
There's a tool called include-what-you-use (IWYU) that plugs into clang/llvm capabilities to detect inclusion issues. I've seen Bitcoin Core devs use this tool to fix up some of the hidden debt in the past too. Perhaps we could:
contrib/devtools
script that runs that tool over our codebaseScope
I'd suggest doing this first for 1.21, see how far we get with cleaning things up and get an idea about the cost of the operation, and then discuss and decide whether we want to do it for 1.14.
The text was updated successfully, but these errors were encountered: