From 92922d19f4c6e8b34d0e7eef40f1c4744472e1f3 Mon Sep 17 00:00:00 2001 From: Paul-Elliot Date: Mon, 4 Sep 2023 16:39:09 +0200 Subject: [PATCH] Compatibility fixes Signed-off-by: Paul-Elliot --- src/odoc/depends.ml | 2 +- test/sources/compile_deps.t/run.t | 30 ++++++++++++++++-------------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/odoc/depends.ml b/src/odoc/depends.ml index 8ee551c86b..0e9144b5a6 100644 --- a/src/odoc/depends.ml +++ b/src/odoc/depends.ml @@ -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 diff --git a/test/sources/compile_deps.t/run.t b/test/sources/compile_deps.t/run.t index 25e23d71ad..34f6fe03b1 100644 --- a/test/sources/compile_deps.t/run.t +++ b/test/sources/compile_deps.t/run.t @@ -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