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.96) (envelope-from ) id 1w0c3a-0023Yj-2Z for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Mar 2026 09:10:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w0c3Y-00DxlB-1A for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Mar 2026 09:10:12 +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.96) (envelope-from ) id 1w0c3X-00Dxl3-2P for pgsql-hackers@lists.postgresql.org; Thu, 12 Mar 2026 09:10:12 +0000 Received: from fout-b6-smtp.messagingengine.com ([202.12.124.149]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w0c3W-00000001kHl-08Rz for pgsql-hackers@lists.postgresql.org; Thu, 12 Mar 2026 09:10:11 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.stl.internal (Postfix) with ESMTP id D46531D00232; Thu, 12 Mar 2026 05:10:08 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Thu, 12 Mar 2026 05:10:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm3; t=1773306608; x=1773393008; bh=lt/ll+ev0Rng0zyoo8LAXDj+5gUnzcwM MDeJi4KPcuc=; b=K+TV2NQeqFB7W6xG2+JBfgEk0Nmeg2v6dPLMdjhxB/V1YOgr spyw57CNWekvgybfiEgWBzJP3XtcjcpC4NagHuiUO7Q0twPVFZXD65+MET7SxXop 5a+CgzX8brg3Wh3NQQ/WvlpFPRfXkSXDJRJtFC6IiSVB1QAnfBNVoZDXWHLbJLmc 2hr/eBM9IWafhn+PbgFYomqR54byxwCDW3oxD5GjywbJ8ZVUAKhKEodbzAvWOhyV ySRyYcH/aRVD2o9ki6bBnCdoFNWjnZklDW3HmozLKqmc1uT5RFjdN0bFPbMGQBcw tc9BJ/mzjqtPgDOPZJ7mmjGGFlRYYF8P5qkU4w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1773306608; x= 1773393008; bh=lt/ll+ev0Rng0zyoo8LAXDj+5gUnzcwMMDeJi4KPcuc=; b=t GwB6hH3M0sOXHGmjXMR4lZSj4bTB8wtOtn5P9E5DwegZWRtUGqHrUh8J2w7548fV MO196RG100/EMTMI5/SmGGaw+duwLMgRkXLcS7p161w1x5RoKausvhTLVuPDDU17 ZS27xC5E/dUvEjEQuz0jXnT2vvva8KgIL85c2ZzpQnC8I4GL4+aKWtD9R4cwqlZi kHemKnx+UtJTavqE1NvqOdNmhTHPIJCLyP7BbxezgDgBfISPpM8I3UlAmLmx6Umz h/VQYo5KTqJPx7yPF+WbNRjqhimQU/r8f37Jau8d0KKb2mgyG/vz3/hB/fgYZ+Gg nQ3uDZuMGhUQDUejcy7Og== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvkeeifeelucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpefrvghtvghr ucfgihhsvghnthhrrghuthcuoehpvghtvghrsegvihhsvghnthhrrghuthdrohhrgheqne cuggftrfgrthhtvghrnhepgfejtdfhkeeftdeugfeileehteeljeeghfeuledthfeutedv ffdukeefjefhgeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepphgvthgvrhesvghishgvnhhtrhgruhhtrdhorhhgpdhnsggprhgtphhtthho peeipdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehpohhsthhgrhgvshesjhgvlh htvghfrdhnlhdprhgtphhtthhopegrnhgurhgvfiesughunhhslhgrnhgvrdhnvghtpdhr tghpthhtohepthhglhesshhsshdrphhghhdrphgrrdhushdprhgtphhtthhopegrshhhuh htohhshhdrsggrphgrthdrohhsshesghhmrghilhdrtghomhdprhgtphhtthhopehpghhs qhhlqdhhrggtkhgvrhhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrghdprhgtph htthhopegurghnihgvlheshigvshhqlhdrshgv X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 12 Mar 2026 05:10:06 -0400 (EDT) Message-ID: Date: Thu, 12 Mar 2026 10:10:05 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Add "format" target to make and ninja to run pgindent and pgperltidy To: Jelte Fennema-Nio , Andrew Dunstan , Tom Lane , Ashutosh Bapat Cc: PostgreSQL Hackers , Daniel Gustafsson References: <3913298.1767194804@sss.pgh.pa.us> <5611b8aa-8496-4632-92b4-e096654850d1@dunslane.net> Content-Language: en-US From: Peter Eisentraut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 04.03.26 10:18, Jelte Fennema-Nio wrote: > On Wed Dec 31, 2025 at 4:48 PM CET, Andrew Dunstan wrote: >> I'd kinda like to unify these universes, though. We could import the >> pgperltidy logic into pgindent but disable it unless some flag were >> given and the correct version of perltidy were present. > > Attached is an initial patchset that does that, as well as improving > pgindent in various other ways. This has removed the make/meson > integration and instead made pgindent smarter at finding pg_bsd_indent > and perltidy. I believe that with all of these QoL improvements we could > enable perltidy in pgindent by default (after doing a full indent run). > > I want to call pretty much all of this code was written by Claude Code > (i.e. an AI). I plan to do another review pass over this code soonish. > Especially the later commits, which I haven't checked in detail yet. > But for now I at least wanted to share the direction of what I've been > working on, because I saw that Peter marked himself as reviewer on the > commitfest app and I don't think it makes sense for him to look at the > previous patchset. Apparently, this is still work in progress, but here are some comments from me. I'm very interested in the patch "pgindent: Clean up temp files on SIGINT", because this is an annoying problem. But I didn't find any documentation about why this is the correct solution. I didn't find anything on the File::Temp man page, for example. Do you have more details? The patch "pgindent: Use git ls-files to discover files" is also interested and pretty straightforward. I guess we don't really care about being able to run this in non-git trees? The other stuff I don't think I'm really on board with. In particular, I don't like integrating pgperltidy into pgindent. These things are in practice run at different times and the underlying tools update differently and require different management, so integrating them all might lead to various annoyances. I kind of liked the original idea of a "make format", and then you could have subtargets like "make format-c" and "make format-perl" if you don't have all the tools. The parallel pgindent is pretty nice, but I wonder how "use POSIX" works on Windows? (But in practice I mostly use pgindent --commit=@, which is still much faster.)