-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
ocamlPackages.lwt_ppx: fix dependency propagation #73401
Conversation
dune was showing this error when using lwt_ppx: File "/nix/store/sz4cg32ph84lapgs50xv73s3a0baqq2s-ocaml4.08.1-lwt_ppx-4.2.1/lib/ocaml/4.08.1/site-lib/lwt_ppx/dune-package", line 11, characters 56-75: 11 | (requires compiler-libs.common ocaml-migrate-parsetree ppx_tools_versioned) ^^^^^^^^^^^^^^^^^^^ Error: Library "ppx_tools_versioned" not found. -> required by library "lwt_ppx" in /nix/store/sz4cg32ph84lapgs50xv73s3a0baqq2s-ocaml4.08.1-lwt_ppx-4.2.1/lib/ocaml/4.08.1/site-lib/lwt_ppx -> required by executable wizytests in dune:6 Hint: try: dune external-lib-deps --missing @@default
8157446
to
a4ebc4f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's typical. Sorry about that.
I found that PPX dependencies are tricky. Consider for instance the The However, it may be convenient and less surprising for the end user to do the propagation. I have no strong opinion on this particular case. |
@Zimmi48 No problem! Note that I was also using I see that If you see the error above, you will see that the error happens because there is a In other words, I'm guessing that |
In the same vein, I've just added
It seems the It's strange that other packages that use For example, I just noticed that |
In the “dune-package” file you mention, the This package has different sets of dependencies depending on how you use it. I thought that these two sets could roughly correspond to the Regarding zlib and cryptokit, can it be the case that it is an upstream bug? If you ask |
Dune 2.0 introduces the following:
It looks like this could be the solution followed by package authors in the future. We could stop propagating libraries ourselves and consider it an upstream bug when a package fails because of a missing transitive dependency. |
Motivation for this change
dune was showing this error when using
lwt_ppx
:Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @vbgl