From 0965009e0f41b7e9f6793b64cbc05972e085b5ed Mon Sep 17 00:00:00 2001 From: Thierry Martinez Date: Thu, 27 Feb 2020 14:59:28 +0100 Subject: [PATCH] Should not initialize predicate with OCaml <4.08.0 We cannot know which modules have already been loaded. --- ppx/findlib_for_ppx.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ppx/findlib_for_ppx.ml b/ppx/findlib_for_ppx.ml index f0d1d1f..8c3ce1a 100644 --- a/ppx/findlib_for_ppx.ml +++ b/ppx/findlib_for_ppx.ml @@ -1,7 +1,7 @@ (* See https://github.com/ocaml/dune/issues/3214 *) let init_predicates () = - if Findlib.recorded_predicates () = [] then + if Sys.ocaml_version < "4.08.0" && Findlib.recorded_predicates () = [] then let preds = ["ppx_driver"; "mt"; "mt_posix"] in let preds = (if Dynlink.is_native then "native" else "byte") :: preds in Findlib.record_package_predicates preds