Skip to content
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
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
fail. (@panglesd, #1069)
- Fix issue #1066 with extended opens (@jonludlam, #1082)
- Fix missing katex headers (@panglesd, #1096)
- Fix resolution of module synopses in {!modules} lists that require
--open (@jonludlam, #1104}


# 2.4.0
Expand Down
10 changes: 7 additions & 3 deletions src/xref2/env.ml
Original file line number Diff line number Diff line change
Expand Up @@ -795,9 +795,6 @@ let open_module_type_substitution : Lang.ModuleTypeSubstitution.t -> t -> t =
in
add_module_type t.Lang.ModuleTypeSubstitution.id ty env

let inherit_resolver env =
match env.resolver with Some r -> set_resolver empty r | None -> empty

let open_units resolver env =
List.fold_left
(fun env m ->
Expand All @@ -809,6 +806,13 @@ let open_units resolver env =
| _ -> env)
env resolver.open_units

let inherit_resolver env =
match env.resolver with
| Some r ->
let e = set_resolver empty r in
open_units r e
| None -> empty

let env_of_unit t ~linking resolver =
let open Lang.Compilation_unit in
let initial_env =
Expand Down
11 changes: 11 additions & 0 deletions test/xref2/github_issue_1103.t/run.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
$ ocamlc -bin-annot -c to_open.mli
$ ocamlc -bin-annot -c test.mli
$ odoc compile to_open.cmti
$ odoc compile -I . test.cmti

The following should not result in any unresolved references

$ odoc link -I . --open To_open test.odoc
$ odoc link -I . to_open.odoc


6 changes: 6 additions & 0 deletions test/xref2/github_issue_1103.t/test.mli
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module X : sig
(** {!Foo} {!To_open.Foo} *)
end

(** {!modules: X} *)

3 changes: 3 additions & 0 deletions test/xref2/github_issue_1103.t/to_open.mli
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module Foo : sig
end