Skip to content

Commit

Permalink
Merge pull request #2009 from rgrinberg/list-public-modules
Browse files Browse the repository at this point in the history
List only public modules in generated index
  • Loading branch information
rgrinberg authored Apr 3, 2019
2 parents bed7677 + b3ec401 commit 73cf910
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 3 deletions.
5 changes: 4 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@ unreleased

- Install .cmi files of private modules in a `.private` directory (#1983, fix
#1973 @rgrinberg)

- Fix dune subst attempting to sunbstitute on directories. (#2000, fix #1997,
@rgrinberg)

- Do not list private modules in the generated index. (#2009, fix #2008,
@rgrinberg)

1.8.2 (10/03/2019)
------------------

Expand Down
1 change: 1 addition & 0 deletions src/odoc.ml
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,7 @@ let default_index ~pkg entry_modules =
"This library exposes the following toplevel modules:\n\
{!modules:%s}\n"
(modules
|> List.filter ~f:Module.is_public
|> List.sort ~compare:(fun x y ->
Module.Name.compare (Module.name x) (Module.name y))
|> List.map ~f:(fun m -> Module.Name.to_string (Module.name m))
Expand Down
3 changes: 2 additions & 1 deletion test/blackbox-tests/test-cases/odoc/dune
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
(library
(name foo)
(modules foo foo2)
(modules foo foo2 foo3)
(wrapped false)
(private_modules foo3)
(public_name foo))

(library
Expand Down
2 changes: 1 addition & 1 deletion test/blackbox-tests/test-cases/odoc/dune-project
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(lang dune 1.0)
(lang dune 1.2)
Empty file.
3 changes: 3 additions & 0 deletions test/blackbox-tests/test-cases/odoc/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
ocamldep .foo.objs/foo2.ml.d
ocamlc .foo.objs/byte/foo2.{cmi,cmo,cmt}
odoc _doc/_odoc/lib/foo/foo2.odoc
ocamldep .foo.objs/foo3.ml.d
ocamlc .foo.objs/byte/foo3.{cmi,cmo,cmt}
odoc _doc/_odoc/lib/foo/private/foo3.odoc
ocamldep .foo_byte.objs/foo_byte.ml.d
ocamlc .foo_byte.objs/byte/foo_byte.{cmi,cmo,cmt}
odoc _doc/_odoc/lib/foo.byte/foo_byte.odoc
Expand Down

0 comments on commit 73cf910

Please sign in to comment.