File tree Expand file tree Collapse file tree 3 files changed +8
-15
lines changed
test/sources/single_mli.t Expand file tree Collapse file tree 3 files changed +8
-15
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ UNRELEASED
4
4
Additions
5
5
- Source code rendering (@Julow , @panglesd , #909 )
6
6
7
+ Bugfixes
8
+ - Fix ` --hidden ` not always taken into account (@panglesd , #940 )
9
+
7
10
2.2.0
8
11
-----
9
12
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ let resolve_imports resolver imports =
107
107
imports
108
108
109
109
(* * Raises warnings and errors. *)
110
- let resolve_and_substitute ~resolver ~make_root ~source
110
+ let resolve_and_substitute ~resolver ~make_root ~source ~ hidden
111
111
(parent : Paths.Identifier.ContainerPage.t option ) input_file input_type =
112
112
let filename = Fs.File. to_string input_file in
113
113
(* [impl_shape] is used to lookup locations in the implementation. It is
@@ -135,6 +135,7 @@ let resolve_and_substitute ~resolver ~make_root ~source
135
135
in
136
136
(unit , None )
137
137
in
138
+ let unit = { unit with hidden = hidden || unit .hidden } in
138
139
let impl_shape =
139
140
match cmt_infos with Some (shape , _ ) -> Some shape | None -> None
140
141
in
@@ -330,8 +331,8 @@ let compile ~resolver ~parent_cli_spec ~hidden ~children ~output
330
331
let make_root = root_of_compilation_unit ~parent_spec ~hidden ~output in
331
332
let result =
332
333
Error. catch_errors_and_warnings (fun () ->
333
- resolve_and_substitute ~resolver ~make_root ~source parent input
334
- input_type)
334
+ resolve_and_substitute ~resolver ~make_root ~hidden ~ source parent
335
+ input input_type)
335
336
in
336
337
(* Extract warnings to write them into the output file *)
337
338
let _, warnings = Error. unpack_warnings result in
Original file line number Diff line number Diff line change @@ -15,13 +15,6 @@ Similar to Astring library.
15
15
$ odoc link -I . a_x. odoc
16
16
$ odoc link -I . a. odoc
17
17
18
- TODO: It seems that -- hidden do not work:
19
- $ odoc_print a_x. odoc | grep hidden
20
- " hidden" : " false" ,
21
- " hidden" : " false"
22
- $ odoc_print a_x. odocl | grep hidden
23
- " hidden" : " false" ,
24
-
25
18
$ odoc html-generate -- source a_x. ml -- indent -o html a_x. odocl
26
19
$ odoc html-generate -- source a. ml -- indent -o html a. odocl
27
20
@@ -35,18 +28,14 @@ Look if all the source files are generated:
35
28
html/ A/ X / Y/ index . html
36
29
html/ A/ X / index . html
37
30
html/ A/ index . html
38
- html/ A_x
39
- html/ A_x/ index . html
40
31
html/ root
41
32
html/ root/ source
42
33
html/ root/ source/ a. ml. html
43
34
html/ root/ source/ a_x. ml. html
44
35
45
- Documentation for `A_x` is not generated for hidden modules, but -- hidden do not
46
- work right now:
36
+ Documentation for `A_x` is not generated for hidden modules:
47
37
48
38
$ ! [ -f html/ A_x/ index . html ]
49
- [1 ]
50
39
51
40
Code source for `A_x` is wanted:
52
41
You can’t perform that action at this time.
0 commit comments