Skip to content

Commit

Permalink
Compatibility fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Paul-Elliot <[email protected]>
  • Loading branch information
panglesd authored and jonludlam committed Sep 13, 2023
1 parent 1a36a10 commit 92922d1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/odoc/depends.ml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ let for_compile_step files =
else for_compile_step_cmi_or_cmti acc file)
~init:Compile_set.empty files
in
set |> Compile_set.to_seq |> List.of_seq
Compile_set.fold (fun a b -> a :: b) set []

module Hash_set : sig
type t
Expand Down
30 changes: 16 additions & 14 deletions test/sources/compile_deps.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,21 @@ code rendering is enabled.

[a.cmti] does not depend on B, while its implementation [a.cmt] depends on B.

$ odoc compile-deps a.cmti
A 21e6137bd9b3aaa3c66960387b5f32c0
CamlinternalFormatBasics 8f8f634558798ee408df3c50a5539b15
Stdlib 6d7bf11af14ea68354925f3a37387930
$ odoc compile-deps a.cmt
A 21e6137bd9b3aaa3c66960387b5f32c0
B 903ddd9b7c0fa4ee6d34b4af6358d1e1
CamlinternalFormatBasics 8f8f634558798ee408df3c50a5539b15
Stdlib 6d7bf11af14ea68354925f3a37387930
$ odoc compile-deps a.cmti | cut -d ' ' -f 1 | sort
A
CamlinternalFormatBasics
Stdlib

$ odoc compile-deps a.cmt | cut -d ' ' -f 1 | sort
A
B
CamlinternalFormatBasics
Stdlib

Must be the merge of both dependencies:
$ odoc compile-deps a.cmti a.cmt
A 21e6137bd9b3aaa3c66960387b5f32c0
B 903ddd9b7c0fa4ee6d34b4af6358d1e1
CamlinternalFormatBasics 8f8f634558798ee408df3c50a5539b15
Stdlib 6d7bf11af14ea68354925f3a37387930

$ odoc compile-deps a.cmti a.cmt | cut -d ' ' -f 1 | sort
A
B
CamlinternalFormatBasics
Stdlib

0 comments on commit 92922d1

Please sign in to comment.