-
Notifications
You must be signed in to change notification settings - Fork 411
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
3.8.0 regression: Error: Library "ppx_deriving_runtime" not found. #7875
Comments
@hannesm there were some change in how |
Thanks for your quick reply. Indeed, there's |
I think that That seems like the sensible behavior to me, but I'm not expert tho. Do you have a pointer to the place the target / host contexts are setup in the build process? |
That's what the mirage tool is doing - it install |
Do you know the reason for this choice? It seems to me, rather naively, that elements generating OCaml code (and therefore running on the host) have more interest in being compiled and available on the host system. This is the main reason why we haven't notified (or been notified of) any changes for this latest release, considering the initial behaviour to be valid (and ultimately requiring no change). EDIT: for the record, @TheLortex raised this issue initialy for our context: #4155 |
@anmonteiro could you look at this? |
@dinosaure precisely |
I'm building a small repro just to make sure we all understand |
So, from what I can tell, we have: dune:
dune.build:
dune.config:
dune-workspace:
and, as expressed earlier, opam-monorepo was used to unpack the |
Here is a smaller repro: https://gist.github.com/samoht/53babb7821a5d492196407a1777a91b9. You just need to setup a x-compilation context and use a package that requires
|
I confirm that a simpler repro just involves setting up a x-compilation setup + depending on the ppx_deriving library:
and
This gives:
|
So the bug here is that ppx_deriving_runtime should come from x not the default context right? |
Thanks @samoht for working on minimizing the reproduction case. |
I'll have a go at this. |
Can you try #7887 with mirage and let me know if this fixes the issue? |
I managed to compile @hannesm repro with your branch, so that seems to fix it. Thanks! |
Thanks, I'm merging and backporting this. |
CHANGES: - Fix a crash when using a version of Coq < 8.13 due to the native compiler config variable being missing. We now explicitly default to `(mode vo)` for these older versions of Coq. (ocaml/dune#7847, fixes ocaml/dune#7846, @Alizter) - Duplicate installed Coq theories are now allowed with the first appearing in COQPATH being preferred. This is inline with Coq's loadpath semantics. This fixes an issue with install layouts based on COQPATH such as those found in nixpkgs. (ocaml/dune#7790, @Alizter) - Revert ocaml/dune#7415 and ocaml/dune#7450 (Resolve `ppx_runtime_libraries` in the target context when cross compiling) (ocaml/dune#7887, fixes ocaml/dune#7875, @emillon)
Thanks for your fast work on this, and cutting a release. I've a question, though, which is, wouldn't the reproduction case @samoht posted above be a nice thing to add to the test suite (to document the expected behaviour, and ensure that no future PR will break that)? |
Already being done: #7896 |
Indeed, and I'd even go further: we want to fix it :) |
Thanks for your quick replies @rgrinberg @anmonteiro. I only missed the tagging of this issue in the PR you prepared. |
Expected Behavior
Compilation succeeds, exit code should be 0, and dist/caldav.hvt should exist.
Actual Behavior
Compilation failure:
No artifacts are produced, exit code is non-zero.
Reproduction
I'm sorry it's likely this can be minimized, but I fail to understand how to best minimize the reproduction case.
Start with an empty switch (OCaml 4.14.1 here), and follow the steps:
Now the above error appears. Doing the very same with a dune 3.7.1 succeeds. I'm sure you've a good idea what changed internally that suddenly a library is no longer found (in both cases, a
grep -r ppx_deriving_runtime duniverse/
returns the exact same results).Specifications
dune
(output ofdune --version
): 3.8.0ocaml
(output ofocamlc --version
) 4.14.1The text was updated successfully, but these errors were encountered: