Re: Run pgindent now?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Run pgindent now?
Дата
Msg-id 20150525230128.GN3908@momjian.us
обсуждение исходный текст
Ответ на Re: Run pgindent now?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Run pgindent now?  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Mon, May 25, 2015 at 05:34:12PM -0400, Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > On Mon, May 25, 2015 at 04:52:38PM -0300, Alvaro Herrera wrote:
> >> Something is wrong.  See aclchk.c changes.
> 
> > Yes, this is what I was concerned about.  "aclitem" was a typedef in 9.0
> > and 9.1, and the use of that as a typedef in 9.4 is certainly odd:
> 
> >     -       aclitem.ai_grantor = grantorId;
> >     +       aclitem.    ai_grantor = grantorId;
> 
> Yeah.  I think we might've gotten rid of that typedef partially in order
> to fix this.
> 
> A different strategy we could consider is "use HEAD's typedef list
> even in the back branches".  This would in some situations lead to
> inferior-looking results in the back branches, but that's probably better
> than inferior results in HEAD.  (In any case, we want the same typedef
> list across all branches.  Then anyplace where the results diverge, there
> must have been non-pgindent code changes, so that back-patching would
> require manual fixups anyway.)
> 
> A longer-term fix would be to make pgindent less stupid about this sort
> of usage, but nobody's yet volunteered to dig into the guts of that code.

I assume a typedefs list is going to be a requirement of any decent C
indenting tool.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + Everyone has their own god. +



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Run pgindent now?
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Run pgindent now?