Re: backend *.c #include cleanup (IWYU) - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: backend *.c #include cleanup (IWYU)
Date
Msg-id 9e92f12b-d582-4aec-9bfe-7630aeb48418@eisentraut.org
Whole thread Raw
In response to Re: backend *.c #include cleanup (IWYU)  (Peter Eisentraut <peter@eisentraut.org>)
List 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

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: RFC: Logging plan of the running query
Next
From: Matthias van de Meent
Date:
Subject: Re: Sequence Access Methods, round two