Russ Allbery > Eagle's Path > December 2021 | DocKnot 6.00 > |
This is my collection of utility functions, Autoconf macros, test programs, and other support infrastructure for my other packages. Changes in this release:
Fix IN6_ARE_ADDR_EQUAL Autoconf probe on macOS, where it needs an include of string.h. Patch from Julien ÉLIE.
Fix RRA_PROG_CC_FLAG and RRA_PROG_LD_FLAG for Clang. Previously they would not reject unknown flags since unknown flags to Clang are only a warning by default. Thanks, Julien ÉLIE.
Disable vertical code alignment in perltidyrc. Code that should be
aligned should use the magical #<<<
comments. The default alignment
is much too aggressive and makes the formatting unstable.
Disable -Wreserved-identifier
in RRA_PROG_CC_WARNING_FLAGS for Clang,
since it produces false positives with FD_ZERO and similar macros
defined in system headers under Clang 13.0.
Update .clang-format for Clang 13.0.
I go a few years between battles with perltidy, then dive in again, try to see if anything has gotten better, make a few tweaks, and leave vaguely frustrated. I've been so spoiled by Python's black that, despite knowing how much harder Perl is to parse, I keep hoping for the same thing.
If anyone knows how to get perltidy to format long method calls the way black does, namely:
$spin = App::DocKnot::Spin->new( { delete => 1, 'style-url' => '/~eagle/styles/' } );
and not (as perltidy insists) either:
$spin = App::DocKnot::Spin->new({ delete => 1, 'style-url' => '/~eagle/styles/' });
or:
$spin = App::DocKnot::Spin->new( { delete => 1, 'style-url' => '/~eagle/styles/' });
or some other weirdness, I'd love to hear it.
Also this time around I discovered that changing the indent for continuation lines also changes the outdent for labels, because those are totally the same thing. A very perltidy sort of problem.
Disabling vertical alignment (which makes code formatting very unstable
and fiddly because perltidy is AMAZINGLY aggressive about what it tries to
vertically align) means that perltidy instead aggressively breaks all of
your vertical alignment. I just want =>
to line up, but not the
arguments to any random function call or the equal signs for every random
assignment. Is this too much to ask? (To be fair, black doesn't do this
either, but for some reason it feels more important to line up fat commas
in Perl than hash constructors in Python.)
I should probably go file bugs against perltidy, and I admit I have not done that and thus there's no reason to expect anyone to know about my wishes. What I want seems different enough from how the program works that I'm not sure that would be appreciated, but I'm probably wrong.
Anyway, you can get the latest version of rra-c-util from its distribution page.
Posted: 2021-12-25 16:59 — Why no comments?
Russ Allbery > Eagle's Path > December 2021 | DocKnot 6.00 > |