-
Notifications
You must be signed in to change notification settings - Fork 470
odoc: use upcoming support-files-targets command #1556
Description
Currently, Dune is hardcoded to assume that the only static file generated by odoc is odoc.css. However, odoc is now also generating highlight.pack.js.
As a consequence, Dune deletes highlight.pack.js on the first rebuild of docs during directory cleanup, and does not have odoc re-generate it (which Dune wouldn't do anyway, if it expected odoc to generate the file in the first place). So, after a rebuild, highlight.pack.js is missing.
Since the set of files odoc generates is likely to change over time, odoc is adding an odoc support-files-targets command (ocaml/odoc#232). Dune should use this during docs builds. We'll probably need to add a conflict with versions of odoc that don't have support-files-targets (<= 1.3.0).
Since this requires running the odoc binary to assemble build rules, it complicates builds in which odoc itself is also being built.
The issue with highlight.pack.js was originally reported in ocaml/odoc#153.