Re: backend *.c #include cleanup (IWYU)

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: backend *.c #include cleanup (IWYU)
Date: 2024-02-26 08:30:37
Message-ID: 9e92f12b-d582-4aec-9bfe-7630aeb48418@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 19.02.24 08:59, Peter Eisentraut wrote:
>> There are other changes I don't understand. E.g. why is
>> catalog/binary_upgrade.h removed from pg_enum.c? It's actually defining
>> binary_upgrade_next_pg_enum_oid, declared in catalog/binary_upgrade.h?
>
> Ah, this is a deficiency in IWYU.  It keeps headers that provide
> function prototypes, but it doesn't keep headers that provide extern
> declarations of global variables.  I have filed an issue about that, and
> it looks like a fix might already be on the way.[0]
>
> [0]:
> https://github.com/include-what-you-use/include-what-you-use/issues/1461
>
> This issue also led me to discover -Wmissing-variable-declarations,
> about which I will post separately.
>
> In the meantime, here is an updated patch with rebase and the above
> issues fixed.

Here is another rebase. Also, for extra caution, I undid all the
removals of various port(ability) includes, such as "port/atomics.h",
just in case they happen to have some impact in some obscure
configuration (= not covered by Cirrus CI).

I propose to commit this patch now, and then maybe come back with more
IWYU-related proposals in the future once the above issues are fixed.

Attachment Content-Type Size
v3-0001-Remove-unused-include-s-from-backend-.c-files.patch text/plain 258.5 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Matthias van de Meent 2024-02-26 08:38:06 Re: Sequence Access Methods, round two
Previous Message Robert Haas 2024-02-26 08:26:44 Re: RFC: Logging plan of the running query