Skip to content

Warn when documenting an executable produces empty documentation #1496

Open
@Lelio-Brun

Description

@Lelio-Brun

When running dune build @doc in a project only containing a package consisting of an executable, odoc does not produce anything but almost empty index files.
dune build @doc-private does not produce anything at all.

It is maybe expected that non-library code does not need documentation pages, but it might be not that obvious.

MNWE:

  • hello.ml
(** An Hello World program *)

(** The message *)
let msg = "Hello, World!"

(** The entry point *)
let main () = print_endline msg

let () = main ()
  • dune
(executable
  (package ohello)
  (public_name hello)
  (name hello))
  • empty ohello.opam

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions