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 1rzMO6-003OUA-LN for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Apr 2024 20:05:10 +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 1rzMO1-00AGno-Uj for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Apr 2024 20:05:05 +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 1rzMO1-00AGnV-K7 for pgsql-hackers@lists.postgresql.org; Tue, 23 Apr 2024 20:05:05 +0000 Received: from mail-il1-x12c.google.com ([2607:f8b0:4864:20::12c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rzMNu-004Ien-JG for pgsql-hackers@postgresql.org; Tue, 23 Apr 2024 20:05:04 +0000 Received: by mail-il1-x12c.google.com with SMTP id e9e14a558f8ab-36a1b0777b7so25614815ab.0 for ; Tue, 23 Apr 2024 13:04:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713902698; x=1714507498; darn=postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=MkLsyHNGB6d7C8hJ+VSMTjUo+e9zFAXS91LsPvUHB5w=; b=FoobELUxRdmsm5f84OaG7Q9p7015d9cUjuje9Tk6d1ckxXFxKmyOGzFC1wIs3hI7yP RwnFN5ZDIOOA8bx6b38/LxSxyLWLo1JNOhyCw2HHgCfDInRy2mjaSfidGAxRiEvNMote QN2bC68HYuK7DhSJAOgJNkMcjjXdiJezsLiLT2uWB+4anI6E9n5uDsQhrHNGV9CU9hYr MS5PLVUdjRqxZd7FIBmKnlRse+EF8vF+glNd1WD2zIWj/dk6bZq0vFewcfQeCcAJezm7 VO//mVd2IRd6TnZXlyilo8QcSzQ+joUsJBwUKv7/tf/gUaqFjB5fpXdeU1wapCkstcM2 RghA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713902698; x=1714507498; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=MkLsyHNGB6d7C8hJ+VSMTjUo+e9zFAXS91LsPvUHB5w=; b=ZDnnX0+XcxBDdSbtJ8nukVXWhc+JB5V4Y6s5LxcLuw9oac137w6PCZ9F4xMdRye/iY jTnd2oeSsl14gPW3VleSi9mzF1Cb8uBGUDphvlti0NC57BSYkvp9cwzkeQWEGrFQOhR4 mmFUUwYUeMN+I00wMVFvwEY4g2HMclsWNdD/jwT3dSqo6MB2i56DFw72heCYFZIlIq1l Ym78GChJStzmnfNtfozbWjZXNVDMoj+pdgk+plkyYpOt89zI3yiRwwKed18CiNkMauaA a/rURgGsXel696rRuaR94NffdpRURUOBXNs+D+8VucXljPUALsqW+r+DW6GbcwCF0mF3 1ivw== X-Gm-Message-State: AOJu0YwcDU1Pa/jHTgEVkLQ7hHim7Qsjvpye63kQduQF4ePo3KGeEF17 7gtItNoQHk1btaA1tCn3rJuPAM/UEg9aQ8GS5sj1grQFeagMSJhr X-Google-Smtp-Source: AGHT+IE/2PY8e7bsoMe7Wf3Nd50WY0NxxzbBMX0cfHo/9Izh7YKHmTTm6YpXeznmOlsV3TKDwboCMg== X-Received: by 2002:a92:cd84:0:b0:36a:3c07:9cdc with SMTP id r4-20020a92cd84000000b0036a3c079cdcmr653189ilb.31.1713902697747; Tue, 23 Apr 2024 13:04:57 -0700 (PDT) Received: from nathanxps13 (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id y14-20020a92c74e000000b0036c02849e90sm1978229ilp.83.2024.04.23.13.04.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 13:04:57 -0700 (PDT) Date: Tue, 23 Apr 2024 15:04:55 -0500 From: Nathan Bossart To: Tom Lane Cc: pgsql-hackers@postgresql.org Subject: Re: Why does pgindent's README say to download typedefs.list from the buildfarm? Message-ID: <20240423200455.GA850264@nathanxps13> References: <20240422192218.GB367217@nathanxps13> <3154983.1713816488@sss.pgh.pa.us> <20240422202010.GA420168@nathanxps13> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="y0ulUmNC+osPPQO6" Content-Disposition: inline In-Reply-To: <20240422202010.GA420168@nathanxps13> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --y0ulUmNC+osPPQO6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Apr 22, 2024 at 03:20:10PM -0500, Nathan Bossart wrote: > On Mon, Apr 22, 2024 at 04:08:08PM -0400, Tom Lane wrote: >> The problem with the README is that it describes that process, >> rather than the now-typical workflow of incrementally keeping >> the tree indented. I don't think we want to remove the info >> about how to do the full-monty process, but you're right that >> the README needs to explain the incremental method as being >> the one most developers would usually use. >> >> Want to write some text? > > Yup, I'll put something together. Here is a first attempt. I'm not tremendously happy with it, but it at least gets something on the page to build on. I was originally going to copy/paste the relevant steps into the description of the incremental process, but that seemed kind-of silly, so I instead just pointed to the relevant steps of the "full" process, along with the deviations from those steps. That's a little more work for the reader, but maybe it isn't too bad... I plan to iterate on this patch some more. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com --y0ulUmNC+osPPQO6 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="pgindent_readme_v1.patch" diff --git a/src/tools/pgindent/README b/src/tools/pgindent/README index b649a21f59..221e3fc010 100644 --- a/src/tools/pgindent/README +++ b/src/tools/pgindent/README @@ -1,8 +1,11 @@ pgindent'ing the PostgreSQL source tree ======================================= -We run this process at least once in each development cycle, -to maintain uniform layout style in our C and Perl code. +The following process is used to maintain uniform layout style in our C and Perl +code. Once in each development cycle, a complete, independent run is performed. +Additionally, an abridged run should be performed on every new commit to +minimize deviations from pgindent's preferred style. See below for more details +on each type of run. You might find this blog post interesting: http://adpgtech.blogspot.com/2015/05/running-pgindent-on-non-core-code-or.html @@ -25,7 +28,20 @@ PREREQUISITES: Or if you have cpanm installed, you can just use: cpanm https://cpan.metacpan.org/authors/id/S/SH/SHANCOCK/Perl-Tidy-20230309.tar.gz -DOING THE INDENT RUN: +DOING AN INCREMENTAL, PER-COMMIT INDENT RUN: + +First, complete steps 1-3 of a complete run listed below. Note that there is +no need to download the typedef file from the buildfarm. Standard practice is +to manually update this file as needed in the same commit that adds or removes +types. The once-per-development-cycle run will resolve any differences between +the incrementally updated version of the file and a clean, autogenerated one. + +Finally, complete steps 1-3 of the validation section below. Ensure that any +changes made by pgindent are included in the patch prior to committing. If you +forget to do so, add the missed pgindent changes in a follow-up commit and also +do step 4 of the validation section below. + +DOING A COMPLETE, ONCE-PER-DEVELOPMENT-CYCLE INDENT RUN: 1) Change directory to the top of the source tree. --y0ulUmNC+osPPQO6--