Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rzGsI-002phJ-29 for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Apr 2024 14:11:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rzGsG-008knu-4F for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Apr 2024 14:11:56 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rzGsF-008knc-Qt for pgsql-hackers@lists.postgresql.org; Tue, 23 Apr 2024 14:11:55 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rzGs9-004GA1-P2 for pgsql-hackers@lists.postgresql.org; Tue, 23 Apr 2024 14:11:54 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 43NEBjQY3329416; Tue, 23 Apr 2024 10:11:46 -0400 From: Tom Lane To: Alvaro Herrera cc: Nathan Bossart , pgsql-hackers@lists.postgresql.org Subject: Re: Why does pgindent's README say to download typedefs.list from the buildfarm? In-reply-to: <202404231023.uqo3r3f5yuns@alvherre.pgsql> References: <202404231023.uqo3r3f5yuns@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Tue, 23 Apr 2024 12:23:25 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3329414.1713881505.1@sss.pgh.pa.us> Date: Tue, 23 Apr 2024 10:11:45 -0400 Message-ID: <3329415.1713881505@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alvaro Herrera writes: > 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. Yeah. I believe that happens when there is no C variable or field anywhere that has that specific struct type. In your example, NotificationHash appears to only be referenced in a sizeof() call, which suggests that maybe the coding is a bit squirrely and could be done another way. Having said that, there already are manually-curated lists of inclusions and exclusions hard-wired into pgindent (see around line 70). I wouldn't have any great objection to adding more entries there. Or if somebody wanted to do the work, they could be pulled out into separate files. regards, tom lane