Repository navigation
Do not link js_of_ocaml in the server library - #277
Merged
Merged
Conversation
Since #247 the server library depended on js_of_ocaml for the types of client values in shared signatures. ocsigenserver then loaded js_of_ocaml.cma with the application, and its module Js failed at initialisation (Unimplemented Javascript primitive caml_pure_js_expr). Add only the include directory, as before #247.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since #247, the server library depends on
js_of_ocaml(--server-libraries js_of_ocaml, which replaced the oldtype_includeshack). I think this breaks every application loaded by ocsigenserver from a configuration file:ocsigen-toolkit.servernow requiresjs_of_ocaml, so ocsigenserver loadsjs_of_ocaml.cmawith the application, and its moduleJsfails at initialisation outside a browser:A standalone executable does not link these modules, which is why the CI and
dune execdo not see it (found while testing os_template in both modes).The server library still needs the interfaces of js_of_ocaml, for the types of client values in shared signatures (
Dom_html.touchEvent Js.tin swipe,File.file Js.tin picture_uploader, form). So this adds only the include directory, through atype_includesrule and anenvstanza in the hand-written part ofsrc/widgets/Ot/dune, and removes the dependency. The generated part is unchanged (dune runtestis clean).Checked: the META of
ocsigen-toolkit.serverno longer requiresjs_of_ocaml; ocsigen-start builds against it without change; os_template loads from a configuration file again (together with ocsigen/eliom's fix for the<eliommodule>configuration).