New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to js_of_ocaml.4.0 #164
Conversation
(* The js_of_ocaml runtime expects to have this registered. | ||
So it's probably a bad idea to use both this Ojs_exn module | ||
and the js_of_ocaml standard library. *) | ||
exception Error = Jsoo_runtime.Error.Exn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it the case that any code that used to catch Ojs_exn.Error
will continue to work as before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, as you can see, I haven't touched the interface. I'm just re-exporting the exception under a different name. The registration is done on the jsoo_runtime side and allow jsoo, gen_js_api and brr to coexist without interfering.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also get rid of implements "externals" in the Ojs module with Jsoo_runtime... or maybe we could get rid of (or deprecate) the whole Ojs module and directly use Jsoo_runtime. But that may be another pull request.
I'm totally ok to merge this one as soon as possible and make an opam release just to quickly have a version of gen_js_api compatible with js_of_ocaml 4 on opam.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mlasson can you take care of merging this PR? Does anything need to be done for the CI to work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully, it will work when ocaml/opam-repository#20533 will be merged (the CI does not know yet how to fetch js_of_ocaml 4.0 with out a "pinning it").
I've removed the -no-check-prim usage as it should no longer be necessary. |
see ocaml/opam-repository#20533
and ocsigen/js_of_ocaml#1224