Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pMayu-0004mZ-VO for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Jan 2023 20:42:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pMayt-0005KY-So for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Jan 2023 20:42:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pMayt-0005Jy-JD for pgsql-hackers@lists.postgresql.org; Mon, 30 Jan 2023 20:42:23 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pMayr-0005jl-4N for pgsql-hackers@postgresql.org; Mon, 30 Jan 2023 20:42:23 +0000 Received: from bruce by momjian.us with local (Exim 4.94.2) (envelope-from ) id 1pMayf-00GsV7-Fw; Mon, 30 Jan 2023 15:42:09 -0500 Date: Mon, 30 Jan 2023 15:42:09 -0500 From: Bruce Momjian To: Noah Misch Cc: Tom Lane , Jelte Fennema , Andres Freund , Peter Geoghegan , Magnus Hagander , Alvaro Herrera , Stephen Frost , Jesse Zhang , PostgreSQL-development Subject: Re: run pgindent on a regular basis / scripted manner Message-ID: References: <1502504.1674433722@sss.pgh.pa.us> <20230123011002.fzcaa3krql3mqsfn@awork3.anarazel.de> <1509591.1674437376@sss.pgh.pa.us> <1608158.1674486546@sss.pgh.pa.us> <20230123173136.knn77pbuakhvjfgk@awork3.anarazel.de> <2238493.1674572097@sss.pgh.pa.us> <20230129010603.GA1677550@rfd.leadboat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230129010603.GA1677550@rfd.leadboat.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, Jan 28, 2023 at 05:06:03PM -0800, Noah Misch wrote: > On Tue, Jan 24, 2023 at 02:04:02PM -0500, Bruce Momjian wrote: > > On Tue, Jan 24, 2023 at 09:54:57AM -0500, Tom Lane wrote: > > > As another example, the mechanisms we use to create the typedefs list > > > in the first place are pretty squishy/leaky: they depend on which > > > buildfarm animals are running the typedef-generation step, and on > > > whether anything's broken lately in that code --- which happens on > > > a fairly regular basis (eg [1]). Maybe that could be improved, > > > but I don't see an easy way to capture the set of system-defined > > > typedefs that are in use on platforms other than your own. I > > > definitely do not want to go over to hand maintenance of that list. > > > > As I now understand it, we would need to standardize on a typedef list > > at the beginning of each major development cycle, and then only allow > > additions, > > Not to my knowledge. There's no particular obstacle to updating the list more > frequently or removing entries. We would need to re-pgindent the tree each time, I think, which would cause disruption if we did it too frequently. > > and the addition would have to include any pgindent affects > > of the addition. > > Yes, a hook intended to enforce pgindent cleanliness should run tree-wide > pgindent when the given commit(s) change the typedef list. typedef list > changes essentially become another kind of refactoring that can yield merge > conflicts. If your commit passed the pgindent check, rebasing it onto a new > typedefs list may require further indentation changes. New typedefs don't > tend to change a lot of old code, so I would expect this sort of conflict to > be minor, compared to all the other sources of conflicts. Agreed. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Embrace your flaws. They make you human, rather than perfect, which you will never be.