Re: run pgindent on a regular basis / scripted manner

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: run pgindent on a regular basis / scripted manner
Дата
Msg-id CABUevEzdOYU2WFu=Hj+F4mkZV-TxLyS1d+azo4cMB3fSN7r37w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: run pgindent on a regular basis / scripted manner  (Noah Misch <noah@leadboat.com>)
Ответы Re: run pgindent on a regular basis / scripted manner
Список pgsql-hackers
On Tue, Feb 7, 2023 at 5:43 AM Noah Misch <noah@leadboat.com> wrote:
>
> On Mon, Feb 06, 2023 at 06:17:02PM +0100, Peter Eisentraut wrote:
> > Also, pgindent takes tens of seconds to run, so hooking that into the git
> > push process would slow this down quite a bit.
>
> The pre-receive hook would do a full pgindent when you change typedefs.list.
> Otherwise, it would reindent only the files being changed.  The average push
> need not take tens of seconds.

It would probably ont be tens of seconds, but it would be slow. It
would need to do a clean git checkout into an isolated environment and
spawn in there, and just that takes time. And it would have to also
know to rebuild pg_bsd_indent on demand, which would require a full
./configure run (or meson equivalent). etc.

So while it might not be tens of seconds, it most definitely won't be fast.

--
 Magnus Hagander
 Me: https://www.hagander.net/
 Work: https://www.redpill-linpro.com/



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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: run pgindent on a regular basis / scripted manner
Следующее
От: "Drouvot, Bertrand"
Дата:
Сообщение: Re: Autogenerate some wait events code and documentation