Re: [RFC suggestion] Generate manpage directly with Asciidoctor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 8 May 2021 at 00:19, Jeff King <peff@xxxxxxxx> wrote:
>
> I _thought_ the original asciidoc was marked as deprecated /
> unmaintained at some point. But it does seem to have gotten a few
> releases in the last year (it looks like maybe the python 2 version was
> EOL, but somebody decided to make the effort to port it to python 3?).
>
> But I wouldn't be at all sad to just standardize on asciidoctor. I think
> we're at parity in terms of the output (thanks to lots of work from you
> and Martin over the past couple of years), and I've generally found it
> nicer to work with.

I tend to think asciidoctor even renders our manpages *better* than
asciidoc does. Not by a huge margin, but a few things here and there.
Some time around the Python 2 EOL, I was about to propose flipping the
default, but then I went to look up the asciidoc EOL schedule, and like
you, I noticed that it was a lot more alive and kicking than I thought
it was. So it's not so much "we should flip to avoid a bitrotting
dependency" as it is "asciidoctor is arguably nicer" or "it's the way
forward".

I've done some working-around in the past to try to make something look
non-broken in both of asciidoc and asciidoctor. Working with *three*
toolchains, we should probably be clear about which one it is we're
going to leave behind, and that shouldn't be the default. I'll be happy
to make a patch. I can't use the EOL argument, it seems, but I do think
it's the only thing that will allow us to reach an xmlto-less generation
of the manpages without losing our minds.

> The only downside is that it may be available in fewer places (though
> I'd think that python vs ruby is not so different). IMHO it's OK to be
> aggressive about the doc toolchain requirements, because the fallback is
> always grabbing the preformatted roff or HTML pages that were generated
> on a different system.

In general, I agree. I do think it's important that "most people
contributing to Git", whatever that means, can build the documentation
to check the part they're adding/modifying and not find it broken left
and right. They would then (quite rightly) not even bother building it.

When we looked at xmlto-less rendering around two years ago [1], we
found various asciidoctor bugs up to and around version 2.0. We would
likely need to require some >=2.0.x. The exact requirements will
probably only become clear when someone really does the work.

I think what I'm arguing for is

  1) switch the default to asciidoctor,
  2) enable optionally using it without xmlto,
  3) figure out what broke and fix it, and document which is the minimum
     asciidoctor version we're going to bother with for (2),
  4) lather, rinse, repeat (3),
  5) switch the default to not using xmlto,
  6) drop the xmlto way of generating the manpages(?).

[1] https://lore.kernel.org/git/20190317194431.GY31362@xxxxxxxxx/

Martin



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux