pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
To: Euler Taveira <euler@eulerto.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Smith <smithpb2250@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Peter Eisentraut <peter@eisentraut.org>
Cc: Euler Taveira <euler.taveira@enterprisedb.com>
Subject: Re: pg_createsubscriber TAP test wrapping makes command options hard to read.
Date: Tue, 21 Jan 2025 01:22:53 +0000
Message-ID: <87ikq93qqa.fsf@wibble.ilmari.org> (raw)
In-Reply-To: <0f90c5bd-e71f-49ec-ab80-ba2008be5c37@app.fastmail.com>
References: <CAHut+PvfaUZQR3rEnj-Dcg_6713Wu4yRdd-yZkkC9NVsARht8A@mail.gmail.com>
	<556792.1733967676@sss.pgh.pa.us>
	<CAHut+Ps6Q+i_3xS6H7ybw3-hx9+2QOuneTJwHArxqxFnKX5+4g@mail.gmail.com>
	<564915.1733971586@sss.pgh.pa.us>
	<CAHut+PvFGytgJT+K_e2x+uWKuVYCBR3HNaNtPKYEkO3YxAwZvw@mail.gmail.com>
	<Z1peKSb8roiDNgRj@paquier.xyz>
	<CAHut+PvYsVhF5k-mYHVEFdpijdgkYRtoeWVxdspxio0ePRpkug@mail.gmail.com>
	<87pllx5cqn.fsf@wibble.ilmari.org>
	<87msh159c3.fsf@wibble.ilmari.org>
	<CAHut+Ptmusd=7SdZ-n0=fu-Y8ut=UaK9nU4Cqk01wxOmio9nkA@mail.gmail.com>
	<87o70143p6.fsf@wibble.ilmari.org>
	<3b6b2595-9822-4e4f-91ee-b6a44dc4b542@app.fastmail.com>
	<3238498.1737413396@sss.pgh.pa.us>
	<0f90c5bd-e71f-49ec-ab80-ba2008be5c37@app.fastmail.com>

"Euler Taveira" <euler@eulerto.com> writes:

> On Mon, Jan 20, 2025, at 7:49 PM, Tom Lane wrote:
>> "Euler Taveira" <euler@eulerto.com> writes:
>> > It is kind of annoying to keep version 20230309 around to run perltidy. Do we
>> > have any other alternatives?
>> 
>> As it says in src/tools/pgindent/README:
>> 
>> 2) Install perltidy.  Please be sure it is version 20230309 (older and newer
>>    versions make different formatting choices, and we want consistency).
>> 
>> I don't think anyone is especially wedded to 20230309 in particular,
>> but we don't want different developers using different versions and
>> coming out with different results.  The whole point of this effort
>> is to standardize code layout as best we can, so that would be
>> counterproductive.
>
> I can live with that.
>
>> Do you have a strong argument for switching to some other specific
>> version of perltidy?
>> 
>
> I don't. Let's see if the Dagfinn's patch will maintain more stable formatting
> over the years. I tested in a previous version (20220613) after applying the
> patch and it didn't suggest changes.

More interesting than running older versions of perltidy would be
running more recent ones.  On top of the perltidy patch upthread, the
current version (20250105) only wants to make a couple of changes to
PostgreSQL::Test::Cluster (attached):

  1. A slight change to the indentation of a multi-line ternary
     statement. I slightly prefer the old version, but the new one
     doesn't bother me either.

  2. Ignoring the length of ## no critic comments when breaking lines,
     which is a definite improvement for the secondary `package`
     statements in the file.

These changes came with Perl::Tidy 20230701, which is the very next
version after the one we're currently using.  Subsequent versions have
caused no other changes, with or without my fat comma patch.

All in all, this makes me +0.5 to bumping the required Perl::Tidy
version, and +0.5 on (at least considering) bumping it to the latest
version before the pre-release-branch pgperltidy run.

- ilmari

Attachments:

0001-Run-pgperltidy-with-Perl-Tidy-20250105.patch.nocfbot (text/x-diff, 1.5K) download From f6eb43ed13d3138c4cbde6bbdc2e17fd583aefa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= <ilmari@ilmari.org> Date: Tue, 21 Jan 2025 00:54:37 +0000 Subject: [PATCH] Run pgperltidy with Perl::Tidy-20250105 --- src/test/perl/PostgreSQL/Test/Cluster.pm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm b/src/test/perl/PostgreSQL/Test/Cluster.pm index f521ad0b12f..fbddc85c554 100644 --- a/src/test/perl/PostgreSQL/Test/Cluster.pm +++ b/src/test/perl/PostgreSQL/Test/Cluster.pm @@ -1826,8 +1826,8 @@ sub get_free_port { foreach my $addr (qw(127.0.0.1), ($use_tcp && $PostgreSQL::Test::Utils::windows_os) - ? qw(127.0.0.2 127.0.0.3 0.0.0.0) - : ()) + ? qw(127.0.0.2 127.0.0.3 0.0.0.0) + : ()) { if (!can_bind($addr, $port)) { @@ -3738,8 +3738,7 @@ sub advance_wal ########################################################################## -package PostgreSQL::Test::Cluster::V_11 - ; ## no critic (ProhibitMultiplePackages) +package PostgreSQL::Test::Cluster::V_11; ## no critic (ProhibitMultiplePackages) use parent -norequire, qw(PostgreSQL::Test::Cluster); @@ -3766,8 +3765,7 @@ sub init ########################################################################## -package PostgreSQL::Test::Cluster::V_10 - ; ## no critic (ProhibitMultiplePackages) +package PostgreSQL::Test::Cluster::V_10; ## no critic (ProhibitMultiplePackages) use parent -norequire, qw(PostgreSQL::Test::Cluster::V_11); -- 2.39.5

view thread (43+ messages)  latest in thread

Message-ID: <87ikq93qqa.fsf@wibble.ilmari.org>
Permalink:  ../87ikq93qqa.fsf@wibble.ilmari.org/
Also on:    postgresql.org/message-id/87ikq93qqa.fsf@wibble.ilmari.org

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: ilmari@ilmari.org, euler@eulerto.com, tgl@sss.pgh.pa.us, smithpb2250@gmail.com, michael@paquier.xyz, pgsql-hackers@lists.postgresql.org, peter@eisentraut.org, euler.taveira@enterprisedb.com
  Subject: Re: pg_createsubscriber TAP test wrapping makes command options hard to read.
  In-Reply-To: <87ikq93qqa.fsf@wibble.ilmari.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox