-
Notifications
You must be signed in to change notification settings - Fork 415
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
Dependency between generated dune-build-info file and clients #3277
Comments
Hmm, so I was pretty sure that build_info_data.mli was compiled with |
If it helps, in my _build/log files, there is no mention of an mli for build_info_data. |
Summary: Previously building would spew: ``` Warning 58: no cmx file was found in path for module Build_info__Build_info_data, and its interface was not compiled with -opaque ``` This is from compilation of the generated `build_info_data.ml-gen`. It does not have an interface, so I don't how to resolve this other than disabling the warning. See also ocaml/dune#3277 . Reviewed By: jvillard Differential Revision: D20589879 fbshipit-source-id: fcd86fb3b
Indeed, it is because the mli is part of |
In case it is useful, it seems that in watch mode, this leads to IO errors such as:
I don't know that this is the same underlying issue, just a guess. |
Ah, I just observed a similar error in watch mode recently. More precisely, if I modify a file while dune is building, I'm seeing such errors. If I modify a file while dune is not running, everything is fine. There might a cleanup that we don't do when we interrupt a build because of file changes. |
I'm not sure, but ocaml/ocaml#9790 (comment) notes a potential difference in flambda mode which might be related to this issue. |
Given what we discovered in #3599, this might be due to a bug in the compiler :/ |
There's not much more we can do, as we already compile the mli only module with -opaque. |
I'm trying to hunt down why I am getting a
warning, which has led me to what looks like a missing dependency from a client of
Build_info
to the generated module.Expected Behavior
For a module e.g. in
cli.ml
that usesBuild_info
,build_info_data.ml-gen
is always compiled beforecli.ml
, so thatbuild_info__Build_info_data.cmx
is available when compilingcli.ml
Actual Behavior
I see build logs where sometimes e.g.
appears after the compilation line for the user.
Reproduction
This seems to be sensitive to parallelism, and I have not managed to create an isolated test that reproduces the warning. Attached is a tarball of a small project that I think is representative of the larger case where this occurs, but the small project does not appear to trigger the warning. The
_build/log
file is included in the archive asbuild_log
for reference.The larger repro is running
dune build _build/dbg/bin/sledge.exe
from infer/sledge. I mention this in case browsing thedune
files there is helpful, but actually setting up the deps for that build is tough (fork of llvm and whatnot).Specifications
dune
(output ofdune --version
): 2.3.1ocaml
(output ofocamlc --version
): 4.08.1The text was updated successfully, but these errors were encountered: