Skip to content

Commit

Permalink
output a file even rendering a hidden module
Browse files Browse the repository at this point in the history
Hidden modules were not rendered, since calling html-generate on them was used
to generate the associated source code.

However, this breaks dune rules in some cases (see issue ocaml#1013), as dune always
expect an output to the command.

This fix is related to the separation of implementation and interface
pipelines (see ocaml#1067).

Signed-off-by: Paul-Elliot <[email protected]>
  • Loading branch information
panglesd committed Jan 11, 2024
1 parent a963381 commit 8cb877f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/odoc/rendering.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ let documents_of_unit ~warnings_options ~syntax ~renderer ~extra unit =
|> Odoc_model.Error.handle_warnings ~warnings_options
>>= fun extra_docs ->
Ok
(if unit.hidden then extra_docs
else Renderer.document_of_compilation_unit ~syntax unit :: extra_docs)
(Renderer.document_of_compilation_unit ~syntax unit :: extra_docs)

let documents_of_page ~warnings_options ~syntax ~renderer ~extra page =
Odoc_model.Error.catch_warnings (fun () ->
Expand Down

0 comments on commit 8cb877f

Please sign in to comment.