reason-native
reason-native copied to clipboard
src/console/nativeChannels.js is incompatible with recent jsoo release.
How can I reproduce this?
I don't know. It depends if you've implemented tests that run with js_of_ocaml. I've just noticed the issue while looking at https://github.com/reasonml/reason-native/blob/master/src/console/nativeChannels.js
In the stubs, such as this one, s is an OCaml string.
//Provides: native_log
function native_log(s) {
joo_global_object.console.log(s.c);
}
in jsoo 5.1.0 (2023-03-07), the memory representation of string was changed. You probably want to use something like
//Provides: native_log
//Requires: caml_jsstring_of_string
function native_log(s) {
- joo_global_object.console.log(s.c);
+ joo_global_object.console.log(caml_jsstring_of_string(s);
}
Same apply to other stubs in that file