From: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
---|---|
To: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: backend *.c #include cleanup (IWYU) |
Date: | 2024-02-12 16:20:00 |
Message-ID: | 20240212162000.GC1645880@nathanxps13 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Feb 12, 2024 at 05:08:40PM +0100, Peter Eisentraut wrote:
> On 10.02.24 21:13, Nathan Bossart wrote:
>> I haven't played with it at all, but the topic reminds me of this thread:
>>
>> https://postgr.es/m/flat/CALDaNm1B9naPDTm3ox1m_yZvOm3KA5S4kZQSWWAeLHAQ%3D3gV1Q%40mail.gmail.com
>
> Approaches like that as well as the in-tree pgrminclude work by "I removed
> the #include and it still compiled fine", which can be unreliable. IWYU on
> the other hand has the compiler tracking where a symbol actually came from,
> and so if it says that an #include is not used, then it's pretty much
> correct by definition.
Okay. FWIW I tend to agree that this is nice cleanup. I'd personally run
this before every commit on HEAD if there was an easy way to do so and it
didn't cause changes to a bunch of unrelated files, but I understand that
the pgindent stuff in the buildfarm isn't super popular. I'd even like to
have a tool that automatically adjusted #include ordering to match project
policy, assuming one does not already exist.
--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com
From | Date | Subject | |
---|---|---|---|
Next Message | David Benjamin | 2024-02-12 16:31:21 | Re: [PATCH] Avoid mixing custom and OpenSSL BIO functions |
Previous Message | Yugo NAGATA | 2024-02-12 16:13:43 | Re: Small fix on query_id_enabled |