I got some warning when building a OCaml project as follows:
There are some missing primitives Dummy implementations (raising 'Failure' exception) will be used if they are not available at runtime. You can prevent the generation of dummy implementations with the commandline option '--disable genprim' Missing primitives: caml_out_channel_pos_fd expect_test_collector_after_test expect_test_collector_before_test
--disable genprim in dune file such as facebook flow’s dune does would hide the warning.
(js_of_ocaml (flags --disable genprim))
Besides using the
--disable genprim option, I was wondering if there may be any alternative way to fix the problem?
I’ve read this thread, it seems that not applying to my specific case.
I tried to Google “caml_out_channel_pos_fd”, and Goole only yield this result Don't bundle ppx_inline_test tests in release mode · Issue #897 · ocaml/dune · GitHub
There isn’t any result when Googling “expect_test_collector_after_test” or “expect_test_collector_before_test”