Skip to content

Commit

Permalink
output an (empty) 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 #1013), as dune always
expect an output to the command.

This fix puts back the old behaviour with regard to rendering hidden files. It
is related to the separation of implementation and interface pipelines (see

Signed-off-by: Paul-Elliot <[email protected]>
  • Loading branch information
panglesd committed Jan 17, 2024
1 parent ca3efc5 commit aba354f
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 aba354f

Please sign in to comment.