Apply IWYU suggested header changes#76
Conversation
|
Cool! I tried to use IWYU before on the core repo but gave up since it didn't seem to work too well on macOS (ended up including a bunch of internal system headers instead of the std headers). If you want to improve compile speed further you might also want to look into putting local classes with methods into anonymous namespaces / add more static declarations. I did that a while ago and while I didn't measure the compile speed I managed to reduce the final binary size quite a bit (~2mb). I also added a tidy-rule for it but it seems like it somehow doesn't trigger in CI, idk, but maybe there is a way to write a script or something to detect symbols that can safely be moved to static linkage (at least my IDE seems to complain). |
|
Hi @Maxxen thanks for the reply! I ran a IWYU against the codebase on ubuntu a while ago, which emits over 60K lines of suggested change, definitely sth I don't want to do manually without auto-fix or agent involvement. :(
Yes, IWYU doesn't seem to smart enough to handle STL libraries, I made a formal PR here, which I explicitly tell the agent to ignore system and STL libraries. Feel free to leave any comments! |
|
Yeah this is probably a pretty good use case for agents haha, good work regardless! |
Hi team, I would like to do a header file cleanup to improve compilation speed (example).
One issue I've found is, since there's transitive inclusion for VSS extension, one of the CI pipeline fails due to changed and missing declaration: https://github.com/dentiny/duckdb/actions/runs/21146969482/job/60814732856
In this PR, I use IWYU to detect issues, which includes missing and extra header files, and use cursor to apply all these changes. This PR is overall a no-op change.