Peter Eisentraut <pe...@eisentraut.org> writes: > I have done a pass over much of the source code with > include-what-you-use (IWYU) to remove superfluous includes (commits > dbbca2cf299, 9be4e5d293b, ecb5af77987). Along the way I have collected > some pragma annotations to deal with exceptions and special cases and > peculiarities of the PostgreSQL source code header structures (see [0] > for description). Here I'm proposing a set of patches to add such > annotations in commonly useful cases that should deal with most of the > noise.
This seems to be going in the direction that there will be Yet Another tool that committers have to know everything about in order to not commit bad code. I'm feeling resistant to that, mainly because I'm far from convinced that IWYU brings us enough value to justify everybody having to learn about it. (The fact that the predecessor tool pgrminclude hasn't been used in a dozen years, and nobody seems to care, speaks volumes here.) In particular, this patchset introduces what seem like very error-prone setups, such as in rmgrdesc.c where there's now one group of #include's with "pragma: begin_keep/pragma: end_keep" around it and another group without. Most of us are likely to just blindly stick a new #include into alphabetical order somewhere in there and not notice that there's now an additional concern. The fact that that you've added precisely zero documentation about what these pragmas are doesn't help. regards, tom lane