Skip to content

Conversation

@art-w
Copy link
Collaborator

@art-w art-w commented Jan 21, 2026

Better support than #12762 since @hhugo fixed the js_of_ocaml support 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)

Signed-off-by: Arthur Wendling <arthur@tarides.com>
@art-w art-w force-pushed the parameterised-jsoo-incr branch 2 times, most recently from 33fe26a to 20688b6 Compare January 22, 2026 11:05
Signed-off-by: Arthur Wendling <arthur@tarides.com>
@art-w art-w force-pushed the parameterised-jsoo-incr branch from 20688b6 to c9be07b Compare January 22, 2026 17:14
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"
Copy link
Collaborator Author

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")
Copy link
Collaborator

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?

Copy link
Collaborator Author

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.

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.

2 participants