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

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: backend *.c #include cleanup (IWYU)
Дата
Msg-id 20240212162000.GC1645880@nathanxps13
обсуждение исходный текст
Ответ на Re: backend *.c #include cleanup (IWYU)  (Peter Eisentraut <peter@eisentraut.org>)
Список 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Yugo NAGATA
Дата:
Сообщение: Re: Small fix on query_id_enabled
Следующее
От: David Benjamin
Дата:
Сообщение: Re: [PATCH] Avoid mixing custom and OpenSSL BIO functions