From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: IWYU annotations |
Date: | 2024-12-09 16:37:11 |
Message-ID: | 3912358.1733762231@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Peter Eisentraut <peter(at)eisentraut(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Bertrand Drouvot | 2024-12-09 16:41:03 | Re: Track the amount of time waiting due to cost_delay |
Previous Message | Malladi, Rama | 2024-12-09 16:36:58 | Re: [PATCH] SVE popcount support |