Skip to content
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

Merged
merged 2 commits into from Feb 10, 2022
Merged

Switch to js_of_ocaml.4.0 #164

merged 2 commits into from Feb 10, 2022

Conversation

hhugo
Copy link
Contributor

@hhugo hhugo commented Jan 25, 2022

(* 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
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Member

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?

Copy link
Member

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").

@mlasson mlasson closed this Jan 25, 2022
@mlasson mlasson reopened this Jan 25, 2022
@mlasson mlasson self-assigned this Jan 25, 2022
@mlasson mlasson closed this Jan 26, 2022
@mlasson mlasson reopened this Jan 26, 2022
@hhugo
Copy link
Contributor Author

hhugo commented Jan 26, 2022

I've removed the -no-check-prim usage as it should no longer be necessary.

@mlasson mlasson closed this Feb 10, 2022
@mlasson mlasson reopened this Feb 10, 2022
@mlasson mlasson merged commit e76f32a into LexiFi:master Feb 10, 2022
@hhugo hhugo deleted the jsoo4 branch February 10, 2022 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants