-
Notifications
You must be signed in to change notification settings - Fork 462
feat(oxcaml): jsoo support for parameterised libs #13414
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
base: main
Are you sure you want to change the base?
Conversation
963b052 to
461453a
Compare
Signed-off-by: Arthur Wendling <arthur@tarides.com>
33fe26a to
20688b6
Compare
Signed-off-by: Arthur Wendling <arthur@tarides.com>
20688b6 to
c9be07b
Compare
| ocaml-compiler: ocaml-variants.5.2.0+ox | ||
| opam-repositories: | | ||
| oxcaml: "git+https://github.com/oxcaml/opam-repository.git" | ||
| oxcaml: "git+https://github.com/art-w/oxcaml-opam-repository.git#jsoo-oxcaml" |
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.
TODO @art-w: revert this manual pin on the patched jsoo once oxcaml/opam-repository#31 or equivalent is merged, it's only there to enable review with a green CI
| Action_builder.of_memo @@ Version.jsoo_version jsoo | ||
| in | ||
| let libs = | ||
| List.map libs ~f:(Lib.Parameterised.for_instance ~build_dir ~ext_lib:"unused") |
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.
Could you explain what is going on here?
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.
The Lib.Parameterised.for_instance updates the library to point to its instantiated version in the build_dir (in case it has arguments, otherwise it does nothing). The native archive uses ext_lib as the extension, but for jsoo it isn't used as we only need the bytecode one.
Better support than #12762 since @hhugo fixed the
js_of_ocamlsupport for OxCaml parameterised libs to enable separate compilation!(Builds on top of a small refactoring #13413 , only the last commit is relevant... Although the code works, I'm marking this PR as a draft since the CI is expected to fail until the oxcaml opam-repo ships jsoo with the fix)