diff mbox series

[bug#47768,04/37] gnu: ocaml-lwt: Make libev a propagated input.

Message ID 20210414091303.6990-4-pukkamustard@posteo.net
State Accepted
Headers show
Series Assorted OCaml patches | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

pukkamustard April 14, 2021, 9:12 a.m. UTC
* gnu/packages/ocaml.scm (ocaml-lwt) [propagated-inputs]: Add libev.
  [inputs]: Remove libev.
  (ocaml-ouint2, ocaml4.07-lambda-term, ocaml-markup) [inputs]: Remove libev.
---
 gnu/packages/ocaml.scm | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

Comments

M April 14, 2021, 6:50 p.m. UTC | #1
On Wed, 2021-04-14 at 11:12 +0200, pukkamustard wrote:
> * gnu/packages/ocaml.scm (ocaml-lwt) [propagated-inputs]: Add libev.
>   [inputs]: Remove libev.
>   (ocaml-ouint2, ocaml4.07-lambda-term, ocaml-markup) [inputs]: Remove libev.
> ---

What's the reason libev has been moved from inputs to propagated-inputs?

Note: I know practically nothing about ocaml packaging.

Greetings,
Maxime.
pukkamustard April 20, 2021, 5:54 a.m. UTC | #2
Hi Maxime,

Thanks for your review!

Maxime Devos <maximedevos@telenet.be> writes:

> On Wed, 2021-04-14 at 11:12 +0200, pukkamustard wrote:
>> * gnu/packages/ocaml.scm (ocaml-lwt) [propagated-inputs]: Add 
>> libev.
>>   [inputs]: Remove libev.
>>   (ocaml-ouint2, ocaml4.07-lambda-term, ocaml-markup) [inputs]: 
>>   Remove libev.
>> ---
>
> What's the reason libev has been moved from inputs to 
> propagated-inputs?
>

As far as I understand libev is a runtime/build time dependency of 
lwt.

Before this patch it was necessary for packages using lwt to also 
add
libev as input (e.g. ocaml4.07-lambda-term or ocaml-markup). This 
was
even worse when using lwt indirectly (e.g. by including 
ocaml-markup
somewhere): build would fail but it was not clear what needs to be 
done
as lwt was not directly included as input (but as propagated-input 
of
ocaml-markup).

Adding libev as propagate-input makes packages using lwt "just 
work".

-pukkamustard
diff mbox series

Patch

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 0ce74db21c..4fc9a45cb0 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1342,9 +1342,6 @@  compilers that can directly deal with packages.")
                (base32
                 "0gxjw1bhmjcjzri6x6psqrkbbyq678b69bqfl9i1zswp7cj2lryg"))))
     (build-system dune-build-system)
-    (inputs
-     ;; XXX Should libev be a propagated-input of ocaml-lwt?
-     `(("libev" ,libev)))
     (propagated-inputs
      `(("lwt" ,ocaml-lwt)
        ("ocaml-stdlib-shims" ,ocaml-stdlib-shims)))
@@ -2318,13 +2315,13 @@  for mapping files in memory.  This function is the same as the
        ("ocaml-cppo" ,ocaml-cppo)
        ("pkg-config" ,pkg-config)))
     (inputs
-     `(("libev" ,libev)
-       ("glib" ,glib)))
+     `(("glib" ,glib)))
     (propagated-inputs
      `(("ocaml-mmap" ,ocaml-mmap)
        ("ocaml-ocplib-endian" ,ocaml-ocplib-endian)
        ("ocaml-result" ,ocaml-result)
-       ("ocaml-seq" ,ocaml-seq)))
+       ("ocaml-seq" ,ocaml-seq)
+       ("libev" ,libev)))
     (home-page "https://github.com/ocsigen/lwt")
     (synopsis "Cooperative threads and I/O in monadic style")
     (description "Lwt provides typed, composable cooperative threads.  These
@@ -3761,8 +3758,6 @@  connect an engine to your inputs and rendering functions to get an editor.")
        ("ocaml-lwt-log" ,(package-with-ocaml4.07 ocaml-lwt-log))
        ("ocaml-lwt-react" ,(package-with-ocaml4.07 ocaml-lwt-react))
        ("ocaml-zed" ,ocaml4.07-zed)))
-    (inputs
-     `(("libev" ,libev)))
     (home-page "https://github.com/diml/lambda-term")
     (synopsis "Terminal manipulation library for OCaml")
     (description "Lambda-Term is a cross-platform library for manipulating the
@@ -6011,8 +6006,6 @@  the full Core is not available, such as in Javascript.")
     (build-system dune-build-system)
     (arguments
      `(#:package "markup"))
-    (inputs
-     `(("libev" ,libev)))
     (propagated-inputs
      `(("ocaml-bisect-ppx" ,ocaml-bisect-ppx)
        ("ocaml-uchar" ,ocaml-uchar)