···11+{0 Weeknotes 2026 week 15}
22+33+Once again, the docs CI went down. This time, something had scribbled over the docker
44+partition and so we needed to do a full build from scratch. Fortunately the docs
55+themselves were not in a docker volume and so we didn't have to rebuild everything
66+to get the HTTP server up and running for ocaml.org. However, we did have to set a
77+full build going so that we can build docs for new packages.
88+99+This keeps happening, and is very annoying! So, that brings me onto the next topic:
1010+day11.
1111+1212+{1 Day11}
1313+1414+I've posted multiple times about {{:https://tunbury.org/}Mark Elvers'} {{:https://github.com/mtelvers/day10}day10}
1515+project. For me, it was an obvious extension of this to get it to build docs, and,
1616+as with most of my work recently, I set Claude on the task. However, Claude failed
1717+to integrate it nicely into the codebase. Taking a closer look at day10, it's a
1818+specialised tool that does its thing really well, but isn't built in a way that
1919+makes it easy to adapt in the ways that the docs needed. Clearly separating the AI
2020+generated code from the hand-written code is very important, so rather than going
2121+that route, I decided that I'd try to build a more general day10 with Claude - day11!
2222+2323+It's already at the point where it's been able to build the docs for all packages
2424+in opam-repository relatively quickly. Running it on [dill], which is roughly
2525+equivalent to [sage], where the docs are currently built, it takes about 6 hours or
2626+so to build everything, where [sage] with ocaml-docs-ci takes several days.
2727+2828+Some intriguing directions we might take this in:
2929+3030+- It's a generic build plaform for opam packages, therefore could possibly be used
3131+ for easily executing binaries from opam packages.
3232+- It can build _itself_ - including new/different dependencies. Interesting for
3333+ a self-modifying tool!
3434+- It's easy to drop into a container with precisely the correct dependencies for
3535+ any package, so useful for debugging build failures. This is partially implemented
3636+ already.
3737+- We can already provide overlay opam-repositories for testing of new/altered
3838+ packages
3939+4040+One really nice test of whether the organisation of the libraries in day11 is correct
4141+is whether we can plumb it into the docs-ci ocurrent pipeline easily, and have the
4242+CLI tools for it coexist nicely.
4343+4444+{1 Odoc performance}
4545+4646+Running odoc on with some of the oxcaml libraries exposes some critical weaknesses
4747+of the current code - in particular {{!/site/blog/2026/03/page-"weeknotes-2026-13".section-"oxmono-docs-build"}performance problems} with particular styles of
4848+code. We can't build the docs for Anil's {{:https://github.com/avsm/oxmono}oxmono}
4949+repo with GHA as it simply runs out of memory. I've therefore been investigating
5050+some of the more egregious memory problems. I've got quite a few patches already
5151+with some good results, but nothing yet that's going to make it into upstream
5252+odoc without some more testing.
5353+5454+{1 Other bits and bobs}
5555+I had fun hour or so putting together an odoc plugin to replicate the experience of
5656+davesnx's {{:https://davesnx.github.io/parseff}parseff site}. The plugin
5757+is {{:https://tangled.org/jon.recoil.org/odoc-parseff-shell/}here}, and
5858+to use it, see my modified parseff repo:
5959+6060+{@shell[
6161+git clone https://github.com/jonludlam/parseff.git#odoc-plugins
6262+opam switch create . --with-doc
6363+dune build @doc
6464+]}
6565+6666+{%html:
6767+<figure>
6868+ <a href="https://jon.ludl.am/experiments/parseff"><img src="parseff.png" alt="A screenshot of the parseff site"></a>
6969+ <figcaption><em>A screenshot of the parseff site produced by the plugin</em></figcaption>
7070+</figure>
7171+%}
7272+7373+There are a number of advantages and disadvantages to this. As @davesnx {{:https://sancho.dev/blog/ocaml-documentation-as-markdown}wrote},
7474+his concern with the markdown output was to be able to integrate the odoc output seamlessly
7575+with an existing site, and it does this very well. However, it's at a cost - we lose links
7676+in the API docs, links to source, the source rendering itself, and so on. Whereas the plugin
7777+I made keeps all of those nice features, but is still tricky to integrate with a larger site.
7878+7979+8080+8181+8282+