Open ewanmellor opened 3 years ago
I'm not really seeing a way to distinguish between +domains and +domains+effects without opam right now. In https://github.com/ocaml-batteries-team/batteries-included/pull/991 I had made batteries compatible with +domains, but +effects being so far away I didn't bother with it.
If you want a quick and dirty fix, here is a patch for batteries to make it work:
diff --git a/build/prefilter.ml b/build/prefilter.ml
index 22697380..7ec72007 100644
--- a/build/prefilter.ml
+++ b/build/prefilter.ml
@@ -54,6 +54,8 @@ let rec process_line loc line =
cmp (major*100+minor) (ver_maj*100+ver_min)
else if ver_string = "multicore" then
cmp (if extra = "+multicore" then 5 else major) 5
+ else if ver_string = "effects" then (* HACK *)
+ cmp (if extra = "+multicore" then 5 else major) 5 (* HACK *)
else
failwith "Could not parse version string"
in
diff --git a/src/batPrintexc.mliv b/src/batPrintexc.mliv
index bfeef612..d59d26d9 100644
--- a/src/batPrintexc.mliv
+++ b/src/batPrintexc.mliv
@@ -179,6 +179,15 @@ val print : _ BatInnerIO.output -> exn -> unit
##V>=4.2## @since 2.2.0 and OCaml 4.01.0
##V>=4.2##*)
##V>=4.2##
+##V>=effects##(** {6 Continuations} *)
+##V>=effects##
+##V>=effects##val get_continuation_callstack: ('a,'b) continuation -> int -> raw_backtrace
+##V>=effects##(** [Printexc.get_continuation_callstack c n] returns a description of the top
+##V>=effects## of the call stack on the continuation [c], with at most [n] entries. (Note:
+##V>=effects## this function is not related to exceptions at all, despite being part of
+##V>=effects## the [Printexc] module.)
+##V>=effects##*)
+##V>=effects##
##V>=4.2##(** {6 Uncaught exceptions} *)
##V>=4.2##
##V>=4.11##val default_uncaught_exception_handler: exn -> raw_backtrace -> unit
Building batteries with 4.12+domains+effects fails with the following error. (Note that 4.12+domains does not fail in the same way.)
Compiler: 2f7fea603d (current HEAD of 4.12+domains+effects branch). Full build log: https://multicore.ci.ocamllabs.io:8100/job/2021-06-28/072651-ci-ocluster-build-e9f16c Successful build with 4.12+effects, for comparison: https://multicore.ci.ocamllabs.io:8100/job/2021-06-28/014040-ci-ocluster-build-3fef23 Successful build with stock 4.12, for comparison: https://multicore.ci.ocamllabs.io:8100/job/2021-06-28/014040-ci-ocluster-build-6d675f
To reproduce: