ml-in-barcelona / jsoo-react

js_of_ocaml bindings for ReactJS. Based on ReasonReact.
https://ml-in-barcelona.github.io/jsoo-react
MIT License
138 stars 19 forks source link

no-cmx-file warnings generated for jsoo-react modules #149

Open glennsl opened 2 years ago

glennsl commented 2 years ago

I'm now getting these warnings when building a project based on the minimal template:

Warning 58 [no-cmx-file]: no cmx file was found in path for module React__Dom_html, and its interface was not compiled with -opaque
Warning 58 [no-cmx-file]: no cmx file was found in path for module React__Dom_svg, and its interface was not compiled with -opaque
Warning 58 [no-cmx-file]: no cmx file was found in path for module React, and its interface was not compiled with -opaque

I've updated to the latest master and created some child projects, amongst other things, but otherwise don't do anything sophisticated and have added no other OCaml dependencies. Any idea what this could be about? If nothing obvious comes to mind I can try to create a minimal repro for it.

jchavarri commented 2 years ago

I tried building the template as it was, and also updated it to latest commit and I can't reproduce. 😕

Is the issue happening when running make build on the template?

glennsl commented 2 years ago

Thanks for trying! Yeah it happens on make build, or make watch. My guess is that it has something to do with using sub projects then. I'll try to make a repro later today.

glennsl commented 2 years ago

Repro here: https://github.com/glennsl/jsoo-react-no-cmx-file-repro. Apparently creating a very basic nested library somehow causes this warning to be emitted,

glennsl commented 2 years ago

Steps to reproduce:

git clone git@github.com:glennsl/jsoo-react-no-cmx-file-repro
cd jsoo-react-no-cmx-file-repro
make create-switch
make init
make build
glennsl commented 2 years ago

Seems to be a dune bug. Created an issue for it at https://github.com/ocaml/dune/issues/5486