diff mbox series

[bug#47768,07/37] gnu: Add ocaml-gen.

Message ID 8635vlfpgy.fsf@posteo.net
State Accepted
Headers show
Series None | expand

Commit Message

pukkamustard April 20, 2021, 6:11 a.m. UTC
Maxime Devos <maximedevos@telenet.be> writes:

>> -(define-public ocaml4.07-gen
>> +(define-public ocaml-gen
>>    [...]
>>     `(#:tests? #f; no tests
>> -       #:package "gen"
>> -       #:ocaml ,ocaml-4.07
>> -       #:findlib ,ocaml4.07-findlib
>> -       #:dune ,ocaml4.07-dune))
>> +       #:package "gen"))
>>      (propagated-inputs
>> -     `(("ocaml-odoc" ,(package-with-ocaml4.07 
>> ocaml4.07-odoc))))
>> +     `(("ocaml-odoc" ,ocaml-odoc)))
>>      (native-inputs
>> -     `(("ocaml-qtest" ,(package-with-ocaml4.07 ocaml-qtest))
>> -       ("ocaml-qcheck" ,(package-with-ocaml4.07 
>> ocaml-qcheck))))
>> +     `(("ocaml-qtest" ,ocaml-qtest)
>> +       ("ocaml-qcheck" ,ocaml-qcheck)))
>
> I'm confused what's going on here.
> ocaml-qtest is for unit tests 
> (https://opam.ocaml.org/packages/qtest/qtest.2.1.0/),
> but for this package we have ‘#:tests? #f; no tests?’?

Excellent catch! There are in fact tests and they also pass. 
Please find
attached updated patch that enables tests (I can also resend the 
entire
patch series as v2 if that is easier).

The `#tests? #f` was introduced with commit
5a4003f453ee8afdfe21d959e105250bfc876063 in 2019 and I blindly 
copied it.

-pukkamustard

Comments

M April 21, 2021, 11:29 a.m. UTC | #1
pukkamustard schreef op di 20-04-2021 om 06:11 [+0000]:
> [...]
> Please find
> attached updated patch that enables tests (I can also resend the 
> entire
> patch series as v2 if that is easier).

I can confirm all packages you modified still build.  But I don't really
know anything about ocaml.

Greetings,
Maxime.
diff mbox series

Patch

From 3036a81329f65c6c9ffe2117744590a7e52aee01 Mon Sep 17 00:00:00 2001
From: pukkamustard <pukkamustard@posteo.net>
Date: Fri, 9 Apr 2021 14:59:36 +0200
Subject: [PATCH] gnu: Add ocaml-gen.

* gnu/packages/ocaml.scm (ocaml-gen): New variable.
  (ocaml4.07-gen): Remove variable.
  (ocaml4.07-sedlex): Replace ocaml4.07-gen with ocaml-gen.
---
 gnu/packages/ocaml.scm | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 503913c8fd..1acde9c0ee 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2508,9 +2508,9 @@  format.  It can process XML documents without a complete in-memory
 representation of the data.")
     (license license:isc)))
 
-(define-public ocaml4.07-gen
+(define-public ocaml-gen
   (package
-    (name "ocaml4.07-gen")
+    (name "ocaml-gen")
     (version "0.5.3")
     (source (origin
               (method git-fetch)
@@ -2523,16 +2523,13 @@  representation of the data.")
                 "1jzrs0nsdk55annkd2zrk5svi61i3b1nk6qyqdc2y26vnzqvzfg8"))))
     (build-system dune-build-system)
     (arguments
-     `(#:tests? #f; no tests
-       #:package "gen"
-       #:ocaml ,ocaml-4.07
-       #:findlib ,ocaml4.07-findlib
-       #:dune ,ocaml4.07-dune))
+     `(#:package "gen"
+       #:test-target "."))
     (propagated-inputs
-     `(("ocaml-odoc" ,(package-with-ocaml4.07 ocaml4.07-odoc))))
+     `(("ocaml-odoc" ,ocaml-odoc)))
     (native-inputs
-     `(("ocaml-qtest" ,(package-with-ocaml4.07 ocaml-qtest))
-       ("ocaml-qcheck" ,(package-with-ocaml4.07 ocaml-qcheck))))
+     `(("ocaml-qtest" ,ocaml-qtest)
+       ("ocaml-qcheck" ,ocaml-qcheck)))
     (home-page "https://github.com/c-cube/gen/")
     (synopsis "Iterators for OCaml, both restartable and consumable")
     (description "Gen implements iterators of OCaml, that are both restartable
@@ -2577,7 +2574,7 @@  and consumable.")
     (native-inputs
      `(("ocamlbuild" ,(package-with-ocaml4.07 ocamlbuild))))
     (propagated-inputs
-     `(("ocaml-gen" ,ocaml4.07-gen)
+     `(("ocaml-gen" ,(package-with-ocaml4.07 ocaml-gen))
        ("ocaml-ppx-tools-versioned"
         ,(package-with-ocaml4.07 ocaml-ppx-tools-versioned))
        ("ocaml-uchar" ,(package-with-ocaml4.07 ocaml-uchar))))
-- 
2.31.1