Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List only public modules in generated index #2009

Merged
merged 2 commits into from
Apr 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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