Re: Lessons from commit fest - Mailing list pgsql-hackers

From Chris Browne
Subject Re: Lessons from commit fest
Date
Msg-id 60skxkqtaf.fsf@dba2.int.libertyrms.com
Whole thread Raw
In response to Re: Lessons from commit fest  (Chris Browne <cbbrowne@acm.org>)
List pgsql-hackers
tgl@sss.pgh.pa.us (Tom Lane) writes:
> Chris Browne <cbbrowne@acm.org> writes:
>> Would it be a terrible idea to...
>> 
>> - Draw the indent code from NetBSD into src/tools/pgindent
>
> I am not real eager to become maintainers of our own indent fork, which
> is what you propose.  (Just for starters, what will we have to do to
> make it run on non-BSD systems?)
>
>> We are presently at the extreme position where pgindent is run once in
>> a very long time (~ once a year), at pretty considerable cost, and
>> with the associated cost that a whole lot of indentation problems are
>> managed by hand.
>
> Yeah.  One reason for that is that the typedef problem makes it a pretty
> manual process.

As I hear more about the "typedef problem," a part of me gets more and
more appalled...  It seems like we're creating some problem for
ourselves in that the typedefs don't seem to be able to be consistent.

I don't have an answer, but it's looking like a sore tooth that
clearly needs attention.

> The main problem I see with "pgindent early and often" is that it only
> works well if everyone is using exactly the same pgindent code (and
> exactly the same typedef list).  Otherwise you just get buried in
> useless whitespace diffs.
>
> It's bad enough that Bruce whacks around his copy from time to time :-(.
> I would say that the single greatest annoyance for maintaining our back
> branches is that patches tend to not back-patch cleanly, and well over
> half the time it's because of random reformattings done by pgindent
> to code that hadn't changed at all, but it had formatted differently
> the prior year. 
>
> For the same reason, my take on your "random whitespace changes are
> acceptable" theory is not no but hell no.  It's gonna cost us,
> permanently, in manual patch adjustments if we allow the repository to
> get cluttered with content-free diffs.

I don't want to be cavalier about it; I'm hoping that in the
discussion, some more stable answer may fall out.  Though with the
typedef issues that have emerged, I'm not entirely sanguine...
-- 
(reverse (concatenate 'string "gro.mca" "@" "enworbbc"))
http://linuxfinances.info/info/internet.html
HEADLINE: Suicidal twin kills sister by mistake! 


pgsql-hackers by date:

Previous
From: Chris Browne
Date:
Subject: Re: MERGE SQL Statement
Next
From: Simon Riggs
Date:
Subject: Re: Plan targetlists in EXPLAIN output