You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently tested a project with OCaml 5 and JSOO 5 and it printed this warning:
Warning: your program contains effect handlers; you should probably run js_of_ocaml with option '--enable=effects'
I'm almost certain that this is incorrect. None of the project's code has changed since using OCaml 4.14, and it only uses a few small dependencies. I opened the JavaScript output and saw that the Effect module functions are included, but do not seem to be called anywhere.
This is due to the use of separate compilation. When compiling the stdlib to JS, we don't know yet whether the Effect module will be used or not later. Also, as tracked by #943, with separate compilation, we unconditionally link all modules of libraries.
Thanks for the information! I can confirm that --profile release does indeed build without the warning.
It may be useful to include that information in the documentation and/or readme. I can imagine that other people may see the warning and incorrectly assume that they need to use --enable=effects when they actually do not.
Describe the bug
I recently tested a project with OCaml 5 and JSOO 5 and it printed this warning:
Warning: your program contains effect handlers; you should probably run js_of_ocaml with option '--enable=effects'
I'm almost certain that this is incorrect. None of the project's code has changed since using OCaml 4.14, and it only uses a few small dependencies. I opened the JavaScript output and saw that the
Effect
module functions are included, but do not seem to be called anywhere.Expected behavior
The repository for my project: https://github.com/johnridesabike/acutis
Expected behavior:
dune build
Actual behavior: the above warning prints.
Versions
ocamlc: 5.0.0
js_of_ocaml: 5.0.1
The text was updated successfully, but these errors were encountered: