ecaml
ecaml copied to clipboard
Expect_test_collector.set being re-run and causing error...
I get this error initialisation error:
Expect_test_collector.set: already set
after dynlinking this code:
let ()=
let module M = (val Major_mode.define_derived_mode ~parent:Major_mode.Fundamental.major_mode
mode_name
[%here]
~docstring:"Major mode for interacting with my thingy"
~mode_line:"MYMODE"
())
in
let keymap=Major_mode.keymap M.major_mode in
Keymap.define_key keymap (Key_sequence.create_exn "<f5>")
(Command (Command.of_value_exn(Value.intern "grabbit")))
As I'm compiling a cma to be dynlinked against the ecaml library and so not re-initialising any ecaml modules, there must be something about the code above that causes Expect_test_collector.set to be called again. But why should this module be linked in at all? I have no expect tests. If it's linking is unavoidable, is there something that can be done to prevent the above call being made? Thanks.