Re: Add "format" target to make and ninja to run pgindent and pgperltidy
| От | Jelte Fennema-Nio |
|---|---|
| Тема | Re: Add "format" target to make and ninja to run pgindent and pgperltidy |
| Дата | |
| Msg-id | CAGECzQTuAPyc5tFOF4qAhZr5JNP+oEn8Tpc-+37Pm68oWhQVKQ@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Add "format" target to make and ninja to run pgindent and pgperltidy (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-hackers |
On Wed, 31 Dec 2025 at 19:37, Tom Lane <tgl@sss.pgh.pa.us> wrote: > As an affected committer, I want to push back against having such > a requirement, because I don't think it is reasonable to require > everybody to have precisely version XYZ of perltidy installed. > If that's not the version provided by their platform-of-choice, > it's an annoying hurdle. That's why I tried to make that hurdle as small as possible. All that's needed with the current patchset is: wget https://cpan.metacpan.org/authors/id/S/SH/SHANCOCK/Perl-Tidy-20230309.tar.gz cpanm -l $HOME/perltidy-20230309 Perl-Tidy-20230309.tar.gz meson setup build -DPERLTIDY=$HOME/perltidy-20230309/bin/perltidy --reconfigure > As a comparison point, we did not start requiring pgindent cleanliness > until we imported bsdindent into our tree, so as not to have an > external dependency for that. (But I can't see vendoring perltidy, > even if there weren't license issues involved.) I agree vendoring perltidy seems like a bad idea. Given you think those 3 commands above are still an annoying hurdle, I'm curious what you think would be a small enough hurdle to not be annoying? A few options I can see: 1. src/tools/indent/get_perltidy /your/path/of/choice (and then give this path to configure/meson) 2. make/ninja get-perltidy (downloads + installs to a known directory inside the build dir) 3. make/ninja format (which then downloads perltidy if it's not yet available) > Here, the hurdle would be erected for no > reason stronger than neatnik-ism, and IMO that's not a good enough > reason to put yet another burden on committers. To me, the goal of autoformatting is the exact opposite of neatnik-ism. It means devs don't have to worry about styling their code nicely because the tool will fix it. So no mental capacity is spent considering arbitrary styling decisions like where to put newlines etc.
В списке pgsql-hackers по дате отправления: