Re: pgindent (was Re: [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.)
Piotr Stefaniak <postgres@piotr-stefaniak.me>
From: Piotr Stefaniak <postgres@piotr-stefaniak.me>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2017-05-17T19:45:10Z
Lists: pgsql-hackers
On 2017-05-17 20:31, Tom Lane wrote: > Piotr Stefaniak <postgres@piotr-stefaniak.me> writes: >> On 2017-05-17 19:16, Alvaro Herrera wrote: >>> We have someone who has studied the BSD indent code and even sent us >>> patches to fix quite a few bugs, but we've largely ignored his efforts >>> so far. I propose we take that indent as part of our repo, and patch it >>> to our preferences. > >> That, I assume, would be me. Coincidentally, I'm about to push my fixes >> upstream (FreeBSD). Before that happens, my changes can be obtained from >> https://github.com/pstef/freebsd_indent and tested, if anyone wishes. > > Yes, I was just reviewing those threads. IIUC, the current proposal is > to adopt FreeBSD's version of indent as being less buggy and better > maintained than NetBSD's, and then patch it as necessary. One of my goals here is to fix bugs in FreeBSD indent so it's easier to develop and maintain. I've also tried hard to not introduce serious regressions for FreeBSD which also uses indent (for some sub-projects even automatically). This is an ongoing effort. What I describe below I believe to have been largely achieved. Another goal is to incorporate all custom changes that make current pg_bsd_indent yet another, unique indent fork, into FreeBSD indent - so that maintaining patches for some other indent by the Postgres project wouldn't be necessary. I understand the need to have control over a copy of it within the Postgres project but it would be nice to not effectively fork it by carrying custom patches around. The third significant issue I kept in my mind was to shift some work-arounds from pgindent to indent. When I use my indent as the base for pgindent and set its options like this: -bad -bap -bc -bl -d0 -cdb -nce -nfc1 -di12 -i4 -l79 -lp -nip -npro -bbb -cli1 -sac -ts4 -cp10 I can remove most of the work-arounds written in the perl script and still get pretty decent results. But I expect some debate over a few things.
Commits
-
Manually un-break a few URLs that pgindent used to insist on splitting.
- 780b3a4c43fd 10.0 landed
-
Remove entab and associated detritus.
- 81f056c7256f 10.0 landed
-
Phase 3 of pgindent updates.
- 382ceffdf7f6 10.0 landed
-
Phase 2 of pgindent updates.
- c7b8998ebbf3 10.0 landed
-
Initial pgindent run with pg_bsd_indent version 2.0.
- e3860ffa4dd0 10.0 landed
-
Adjust pgindent script to use pg_bsd_indent 2.0.
- 8ff6d4ec7840 10.0 landed
-
Final pgindent run with old pg_bsd_indent (version 1.3).
- 9ef2dbefc7fb 10.0 landed
-
Re-run pgindent.
- 651902deb155 10.0 landed
-
Preventive maintenance in advance of pgindent run.
- c079673dcb7f 10.0 cited