git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC suggestion] Generate manpage directly with Asciidoctor

From
MÅMartin Ågren <martin.agren@gmail.com>
Date
May 9, 2021, 08:20 UTC
Message-ID
<CAN0heSpN_ieGc2HJCvSsmUuEqS-GGPDcZHz=v2Z3hJY=Or_HMw@mail.gmail.com>
In-Reply-To
<YJW81zNr5bgW+yVs@coredump.intra.peff.net>
On Sat, 8 May 2021 at 00:19, Jeff King <peff@peff.net> wrote:
Show 10 quoted lines
>
> 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.

Show 5 quoted lines
> 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@pobox.com/
Martin
Previous: Bagas SanjayaNext: Felipe Contreras
Message 13 of 38 in “[RFC suggestion] Generate manpage directly with Asciidoctor”
  1. Bagas SanjayaMay 7, 2021
  2. Randall S. BeckerMay 7, 2021
  3. Felipe ContrerasMay 7, 2021
  4. brian m. carlsonMay 7, 2021
  5. Randall S. BeckerMay 8, 2021
  6. Đoàn Trần Công DanhMay 7, 2021
  7. Bagas SanjayaMay 7, 2021
  8. Felipe ContrerasMay 7, 2021
  9. Bagas SanjayaMay 8, 2021
  10. brian m. carlsonMay 7, 2021
  11. Jeff KingMay 7, 2021
  12. Bagas SanjayaMay 8, 2021
  13. Martin ÅgrenMay 9, 2021
  14. Felipe ContrerasMay 9, 2021
  15. Martin ÅgrenMay 10, 2021
  16. Jeff KingMay 10, 2021
  17. Felipe ContrerasMay 11, 2021
  18. Jeff KingMay 11, 2021
  19. Felipe ContrerasMay 11, 2021
  20. Ævar Arnfjörð BjarmasonMay 11, 2021
  21. Felipe ContrerasMay 11, 2021
  22. Jeff KingMay 11, 2021
  23. Felipe ContrerasMay 11, 2021
  24. brian m. carlsonMay 11, 2021
  25. Felipe ContrerasMay 12, 2021
  26. Martin ÅgrenMay 11, 2021
  27. Jeff KingMay 11, 2021
  28. Martin ÅgrenMay 11, 2021
  29. Felipe ContrerasMay 11, 2021
  30. Jean-Noël AvilaMay 11, 2021
  31. Martin ÅgrenMay 11, 2021
  32. Felipe ContrerasMay 7, 2021
  33. brian m. carlsonMay 7, 2021
  34. Jeff KingMay 8, 2021
  35. Jeff KingMay 8, 2021
  36. brian m. carlsonMay 9, 2021
  37. Martin ÅgrenMay 9, 2021
  38. Felipe ContrerasMay 7, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.