Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
ocamlPackages.lwt_ppx: fix dependency propagation #73401
Motivation for this change
dune was showing this error when using
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
I found that PPX dependencies are tricky.
Consider for instance 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.
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.