!avYyleMexqjFHoqrME:nixos.org

Nix Documentation

439 Members
Discussion about documentation improvements around the Nix ecosystem93 Servers

Load older messages


SenderMessageTime
11 Jun 2023
@penguincoder:matrix.wolfie.pw@penguincoder:matrix.wolfie.pwWhere is the current manual located?00:53:28
@pennae:matrix.eno.spacepennaewhich one? rendered or source?00:54:36
@penguincoder:matrix.wolfie.pw@penguincoder:matrix.wolfie.pwSource! I’m curious about the above changes to your workflow and current state-of-the-world01:35:54
@pennae:matrix.eno.spacepennaenixpkgs and nixos manuals live in the nixpkgs repo, under doc and nixos/doc respectively01:37:02
@pennae:matrix.eno.spacepennaestate of the world is basically "ugh"01:38:37
@pennae:matrix.eno.spacepennaethere's a lot of legacy docbook workflow that's in an eternal state of being replaced but not quite gone yet, which is always very fun and makes docs build errors extremely Fun™ to debug01:40:44
@penguincoder:matrix.wolfie.pw@penguincoder:matrix.wolfie.pwIs it just built with CI? Much like a Unix system, I know CI.01:42:22
@pennae:matrix.eno.spacepennaeci does build docs for prs, docs for user systems are built by hydra but use the same expressions01:43:33
@pennae:matrix.eno.spacepennaeor, if users added to the docs (eg via the module system), the docs are built on the user system. that's probably not the common case though01:44:28
@pennae:matrix.eno.spacepennaeespecially since the nixos docs build was excrutiatingly slow for the longest time and still spends way to much time in docbook even now, but that's on the way out at least01:45:10
@penguincoder:matrix.wolfie.pw@penguincoder:matrix.wolfie.pwOkay. Well, my current project at work is called “CI Speed”. Where are the jobs stored? I can piece together what they do and maybe find a quicker way to build it.01:50:23
@pennae:matrix.eno.spacepennaewe've got the speed thing sorted out, it's just a question of removing the docbook interim stage01:52:55
@pennae:matrix.eno.spacepennaewhich is also for the most part just needs flipping a switch (and emplacing some dummy epubs that link to the html manual)01:53:56
@pennae:matrix.eno.spacepennae(i think last we benchmarked it the docbook-free nixos manual build took five seconds, vs five minutes it took a few releases ago before xsltproc got their shit together somewhat)01:55:33
@penguincoder:matrix.wolfie.pw@penguincoder:matrix.wolfie.pwOh, that’s an impressive improvement in runtime. So the biggest challenge is just undesirable process and cruft?01:59:19
@pennae:matrix.eno.spacepennaethat's one way to put it01:59:58
@pennae:matrix.eno.spacepennaedocbook rendering has been (and still is to an extent) slow because xsltproc just isn't really up to the sizes of manuals we throw at it. and nobody likes writing docbook.02:01:09
@penguincoder:matrix.wolfie.pw@penguincoder:matrix.wolfie.pwIs porting an option?02:06:17
@penguincoder:matrix.wolfie.pw@penguincoder:matrix.wolfie.pwmdbook is nice02:06:31
@pennae:matrix.eno.spacepennaewell, we've already written an entirely new system because mdbook was deemed too large 😬02:06:57
@pennae:matrix.eno.spacepennaesame principle though, if with a much larger markdown dialect that's more amenable to extension as we need02:07:27
@pennae:matrix.eno.spacepennaethe nixos manual build is currently the only thing that uses this and is unfortunately a bit complicated, so it's not quite that easy to demonstrate unless you dig a lot02:10:40
@penguincoder:matrix.wolfie.pw@penguincoder:matrix.wolfie.pw

Okay, that’s totally reasonable. Can you point me to that process?

Also: mdbook was too big? I thought it was small?

02:26:43
@pennae:matrix.eno.spacepennaemdbook is big in that it has a lot of large dependencies (eg, the rust compiler)02:31:31
@pennae:matrix.eno.spacepennaegotta go now too02:32:10
@penguincoder:matrix.wolfie.pw@penguincoder:matrix.wolfie.pw

I can understand that the Rust ecosystem is too much for a single step. Don’t get me wrong, I like it. But I can totally get why there would be resistance. As a single item, mdbook is not enough to adopt rust.

Thanks for your explantions pennae

03:53:13
@jtojnar:matrix.orgJan Tojnar
In reply to @pennae:matrix.eno.space
pandoc does not seem to natively support rendering docbook figures from image sources? excellent.
what do you mean? In pandoc 2, there is https://github.com/jgm/pandoc/blob/2.19.2/src/Text/Pandoc/Writers/Docbook.hs#L235-L246 and you need to make sure it is figure in the Pandoc AST (e.g. when using markdown reader with implicit_figures extension)
15:30:51
@pennae:matrix.eno.spacepennae
In reply to @jtojnar:matrix.org
what do you mean? In pandoc 2, there is https://github.com/jgm/pandoc/blob/2.19.2/src/Text/Pandoc/Writers/Docbook.hs#L235-L246 and you need to make sure it is figure in the Pandoc AST (e.g. when using markdown reader with implicit_figures extension)
that does not generate the same figures the graphviz block does. we haven't found any way to generate that node in about 10 minutes of searching, and then decided it's not worth the effort to convert the figure to markdown first if it's only to keep the diff between mauals small. it's just the one image after all
15:32:44
@jtojnar:matrix.orgJan Tojnaryeah, that sounds reasonable15:33:24
@jtojnar:matrix.orgJan Tojnar IIRC, the criteria were image standing alone in a paragraph, having title starting with fig: 15:36:26

Show newer messages


Back to Room ListRoom Version: 6