Re: Why does pgindent's README say to download typedefs.list from the buildfarm?

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Nathan Bossart <nathandbossart(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Why does pgindent's README say to download typedefs.list from the buildfarm?
Date: 2024-04-23 10:23:25
Message-ID: 202404231023.uqo3r3f5yuns@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2024-Apr-22, Tom Lane wrote:

> The main reason there's a delta is that people don't manage to
> maintain the in-tree copy perfectly (at least, they certainly
> haven't done so for this past year). So we need to do that
> to clean up every now and then.

Out of curiosity, I downloaded the buildfarm-generated file and
re-indented the whole tree. It turns out that most commits seem to have
maintained the in-tree typedefs list correctly when adding entries (even
if out of alphabetical order), but a few haven't; and some people have
added entries that the buildfarm script does not detect. So the import
from BF will delete those entries and mess up the overall indent. For
example it does stuff like

+++ b/src/backend/commands/async.c
@@ -399,7 +399,7 @@ typedef struct NotificationList
typedef struct NotificationHash
{
Notification *event; /* => the actual Notification struct */
-} NotificationHash;
+} NotificationHash;

There's a good half dozen of those.

I wonder if we're interested in keeping a (very short) manually-
maintained list of symbols that we know are in use but the scripts
don't extract for whatever reason.

The change of NotificationHash looks surprising at first sight:
apparently 095d109ccd7 deleted the only use of that type as a variable
anywhere. But then I wonder if that datatype is useful at all anymore,
since it only contains one pointer -- it seems we could just remove it.

But there are others: InjectionPointEntry, ResourceOwnerData,
JsonNonTerminal, JsonParserSem, ...

--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
"This is what I like so much about PostgreSQL. Most of the surprises
are of the "oh wow! That's cool" Not the "oh shit!" kind. :)"
Scott Marlowe, http://archives.postgresql.org/pgsql-admin/2008-10/msg00152.php

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2024-04-23 11:17:39 Minor document typo
Previous Message Heikki Linnakangas 2024-04-23 09:37:40 Re: POC: make mxidoff 64 bits