all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#44032] [PATCH] gnu: ocaml: Update to 4.11.1
@ 2020-10-16 15:14 Julien Lepiller
  2020-10-16 19:21 ` Brett Gilio
  2020-10-19 13:31 ` zimoun
  0 siblings, 2 replies; 7+ messages in thread
From: Julien Lepiller @ 2020-10-16 15:14 UTC (permalink / raw)
  To: 44032

[-- Attachment #1: Type: text/plain, Size: 522 bytes --]

Hi Guix!

this small patch series update ocaml to 4.11.1. The first patch adds
ocaml 4.11.1, the second adds findlib for 4.09, the third add
package-with-ocaml4.09 (along with ocaml4.09-dune, which I can't put in
a separate patch without breaking something). Then, three patches fix
the build of three packages (with these patches, they build fine with
4.09 and 4.11).  The last patch performs the final switch to 4.11.
Easier than I expected! :)

Note that with that, previously unreproducible packages are
reproducible!

[-- Attachment #2: 0001-gnu-ocaml-Update-to-4.11.1.patch --]
[-- Type: text/x-patch, Size: 1981 bytes --]

From 2dc52a0077ffe1f0b416032fb1dfbf035f82c34e Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Thu, 15 Oct 2020 22:02:56 +0200
Subject: [PATCH 1/7] gnu: ocaml: Update to 4.11.1.

* gnu/packages/ocaml.scm (ocaml): Update to 4.11.1.
---
 gnu/packages/ocaml.scm | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 4cc530509a..be2f486179 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -132,10 +132,10 @@
                          "/lib/ocaml/site-lib"))
     #:phases (modify-phases %standard-phases (delete 'configure))))
 
-(define-public ocaml-4.09
+(define-public ocaml-4.11
   (package
     (name "ocaml")
-    (version "4.09.0")
+    (version "4.11.1")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -144,7 +144,7 @@
                     "/ocaml-" version ".tar.xz"))
               (sha256
                (base32
-                "1v3z5ar326f3hzvpfljg4xj8b9lmbrl53fn57yih1bkbx3gr3yzj"))))
+                "0k4521c0p10c5ams6vjv5qkkjhmpkb0bfn04llcz46ah0f3r2jpa"))))
     (build-system gnu-build-system)
     (native-search-paths
      (list (search-path-specification
@@ -202,6 +202,20 @@ functional, imperative and object-oriented styles of programming.")
     ;; distributed under lgpl2.0.
     (license (list license:qpl license:lgpl2.0))))
 
+(define-public ocaml-4.09
+  (package
+    (inherit ocaml-4.11)
+    (version "4.09.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "http://caml.inria.fr/pub/distrib/ocaml-"
+                    (version-major+minor version)
+                    "/ocaml-" version ".tar.xz"))
+              (sha256
+               (base32
+                "1v3z5ar326f3hzvpfljg4xj8b9lmbrl53fn57yih1bkbx3gr3yzj"))))))
+
 (define-public ocaml-4.07
   (package
     (inherit ocaml-4.09)
-- 
2.28.0


[-- Attachment #3: 0002-gnu-Add-ocaml4.09-findlib.patch --]
[-- Type: text/x-patch, Size: 911 bytes --]

From 2b5fa1b7f30e7ff0315a752e10e87930e72dbb8e Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Thu, 15 Oct 2020 22:04:36 +0200
Subject: [PATCH 2/7] gnu: Add ocaml4.09-findlib.

* gnu/packages/ocaml.scm (ocaml4.09-findlib): New variable.
---
 gnu/packages/ocaml.scm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index be2f486179..84daa8afca 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1007,6 +1007,14 @@ compilers that can directly deal with packages.")
      `(("m4" ,m4)
        ("ocaml" ,ocaml-4.07)))))
 
+(define-public ocaml4.09-findlib
+  (package
+    (inherit ocaml-findlib)
+    (name "ocaml4.09-findlib")
+    (native-inputs
+     `(("m4" ,m4)
+       ("ocaml" ,ocaml-4.09)))))
+
 ;; note that some tests may hang for no obvious reason.
 (define-public ocaml-ounit
   (package
-- 
2.28.0


[-- Attachment #4: 0003-guix-ocaml-Add-package-with-ocaml4.09.patch --]
[-- Type: text/x-patch, Size: 5998 bytes --]

From a810e6647ba30aba02b58840101ee66b7fbcd792 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Thu, 15 Oct 2020 22:34:38 +0200
Subject: [PATCH 3/7] guix: ocaml: Add package-with-ocaml4.09.

* guix/build-system/ocaml.scm (package-with-ocaml4.09)
(strip-ocaml4.09-variant): New variables.
* gnu/packages/ocaml.scm (ocaml4.09-result, ocaml4.09-csexp)
(ocaml4.09-dune-configurator, ocaml4.09-dune): New variables.
---
 gnu/packages/ocaml.scm      | 46 ++++++++++++++++++++++++++++++++++++-
 guix/build-system/ocaml.scm | 27 ++++++++++++++++++++++
 2 files changed, 72 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 84daa8afca..e3ddb36a4e 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1321,15 +1321,36 @@ following a very simple s-expression syntax.")
        #:tests? #f))
     (propagated-inputs
      `(("ocaml-csexp" ,ocaml-csexp)))
+    (properties `((ocaml4.09-variant . ,(delay ocaml4.09-dune-configurator))))
     (synopsis "")
     (description "")))
 
+(define-public ocaml4.09-dune-configurator
+  (package
+    (inherit dune-configurator)
+    (name "ocaml4.09-dune-configurator")
+    (arguments
+     `(#:package "dune-configurator"
+       #:tests? #f
+       #:dune ,(package-with-ocaml4.09 dune-bootstrap)
+       #:ocaml ,ocaml-4.09
+       #:findlib ,ocaml4.09-findlib))
+    (propagated-inputs
+     `(("ocaml-csexp" ,(package-with-ocaml4.09 ocaml-csexp))))))
+
 (define-public dune
   (package
     (inherit dune-bootstrap)
     (propagated-inputs
      `(("dune-configurator" ,dune-configurator)))
-    (properties `((ocaml4.07-variant . ,(delay ocaml4.07-dune))))))
+    (properties `((ocaml4.07-variant . ,(delay ocaml4.07-dune))
+                  (ocaml4.09-variant . ,(delay ocaml4.09-dune))))))
+
+(define-public ocaml4.09-dune
+  (package
+    (inherit (package-with-ocaml4.09 dune-bootstrap))
+    (propagated-inputs
+     `(("dune-configurator" ,dune-configurator)))))
 
 (define-public ocaml4.07-dune
   (package
@@ -1370,6 +1391,7 @@ following a very simple s-expression syntax.")
              #t)))))
     (propagated-inputs
      `(("ocaml-result" ,ocaml-result)))
+    (properties `((ocaml4.09-variant . ,(delay ocaml4.09-csexp))))
     (home-page "https://github.com/ocaml-dune/csexp")
     (synopsis "Parsing and printing of S-expressions in Canonical form")
     (description "This library provides minimal support for Canonical
@@ -1386,6 +1408,18 @@ To avoid a dependency on a particular S-expression library, the only
 module of this library is parameterised by the type of S-expressions.")
     (license license:expat)))
 
+(define-public ocaml4.09-csexp
+  (package
+    (inherit ocaml-csexp)
+    (name "ocaml4.09-csexp")
+    (arguments
+     `(#:ocaml ,ocaml-4.09
+       #:findlib ,ocaml4.09-findlib
+       ,@(substitute-keyword-arguments (package-arguments ocaml-csexp)
+           ((#:dune _) (package-with-ocaml4.09 dune-bootstrap)))))
+    (propagated-inputs
+     `(("ocaml-result" ,(package-with-ocaml4.09 ocaml-result))))))
+
 (define-public ocaml-migrate-parsetree
   (package
     (name "ocaml-migrate-parsetree")
@@ -1494,12 +1528,22 @@ powerful.")
     (arguments
      `(#:test-target "."
        #:dune ,dune-bootstrap))
+    (properties `((ocaml4.09-variant . ,(delay ocaml4.09-result))))
     (home-page "https://github.com/janestreet/result")
     (synopsis "Compatibility Result module")
     (description "Uses the new result type defined in OCaml >= 4.03 while
 staying compatible with older version of OCaml should use the Result module
 defined in this library.")
     (license license:bsd-3)))
+
+(define-public ocaml4.09-result
+  (package
+    (inherit ocaml-result)
+    (arguments
+     `(#:test-target "."
+       #:dune ,(package-with-ocaml4.09 dune-bootstrap)
+       #:ocaml ,ocaml-4.09
+       #:findlib ,ocaml4.09-findlib))))
  
 (define-public ocaml-topkg
   (package
diff --git a/guix/build-system/ocaml.scm b/guix/build-system/ocaml.scm
index c5996bf0cf..5513216c25 100644
--- a/guix/build-system/ocaml.scm
+++ b/guix/build-system/ocaml.scm
@@ -29,6 +29,8 @@
   #:export (%ocaml-build-system-modules
             package-with-ocaml4.07
             strip-ocaml4.07-variant
+            package-with-ocaml4.09
+            strip-ocaml4.09-variant
             default-findlib
             default-ocaml
             lower
@@ -96,6 +98,18 @@
   (let ((module (resolve-interface '(gnu packages ocaml))))
     (module-ref module 'ocaml4.07-dune)))
 
+(define (default-ocaml4.09)
+  (let ((ocaml (resolve-interface '(gnu packages ocaml))))
+    (module-ref ocaml 'ocaml-4.09)))
+
+(define (default-ocaml4.09-findlib)
+  (let ((module (resolve-interface '(gnu packages ocaml))))
+    (module-ref module 'ocaml4.09-findlib)))
+
+(define (default-ocaml4.09-dune)
+  (let ((module (resolve-interface '(gnu packages ocaml))))
+    (module-ref module 'ocaml4.09-dune)))
+
 (define* (package-with-explicit-ocaml ocaml findlib dune old-prefix new-prefix
                                        #:key variant-property)
   "Return a procedure of one argument, P.  The procedure creates a package
@@ -171,6 +185,19 @@ pre-defined variants."
     (inherit p)
     (properties (alist-delete 'ocaml4.07-variant (package-properties p)))))
 
+(define package-with-ocaml4.09
+  (package-with-explicit-ocaml (delay (default-ocaml4.09))
+                               (delay (default-ocaml4.09-findlib))
+                               (delay (default-ocaml4.09-dune))
+                               "ocaml-" "ocaml4.09-"
+                               #:variant-property 'ocaml4.09-variant))
+
+(define (strip-ocaml4.09-variant p)
+  "Remove the 'ocaml4.09-variant' property from P."
+  (package
+    (inherit p)
+    (properties (alist-delete 'ocaml4.09-variant (package-properties p)))))
+
 (define* (lower name
                 #:key source inputs native-inputs outputs system target
                 (ocaml (default-ocaml))
-- 
2.28.0


[-- Attachment #5: 0004-gnu-laby-Update-to-0.7.0.patch --]
[-- Type: text/x-patch, Size: 1239 bytes --]

From 447de03a51a39fa7a7d8c5216c8ba23e632d0b88 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 16 Oct 2020 17:01:40 +0200
Subject: [PATCH 4/7] gnu: laby: Update to 0.7.0.

* gnu/packages/games.scm (laby): Update to 0.7.0.
---
 gnu/packages/games.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index d473baa335..b03e4ebfea 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -5119,7 +5119,7 @@ Linux / Mac OS X servers, and an auto mapper with a VT100 map display.")
 (define-public laby
   (package
     (name "laby")
-    (version "0.6.4")
+    (version "0.7.0")
     (source
      (origin (method git-fetch)
              (uri (git-reference
@@ -5128,7 +5128,7 @@ Linux / Mac OS X servers, and an auto mapper with a VT100 map display.")
              (file-name (git-file-name name version))
              (sha256
               (base32
-               "12fq9hhrxpzgfinmj9ra9ckss9yficwdlrmgjvvsq7agvh3sgyl1"))
+               "1y6nfxcjhqg9bb81hs0wijg7kcwk5kff81rgd8bsv5ps7ia9nj6b"))
              (patches (search-patches "laby-make-install.patch"))))
     (build-system gnu-build-system)
     (inputs
-- 
2.28.0


[-- Attachment #6: 0005-gnu-ocaml-ppx-tools-versioned-Use-release-profile.patch --]
[-- Type: text/x-patch, Size: 999 bytes --]

From cb1c4f34d558b3b0b3cfc2d21d77c3d703f6013c Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 16 Oct 2020 17:02:56 +0200
Subject: [PATCH 5/7] gnu: ocaml-ppx-tools-versioned: Use release profile.

* gnu/packages/ocaml.scm (ocaml-ppx-tools-versioned): Use release
profile.
---
 gnu/packages/ocaml.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index e3ddb36a4e..15ca326376 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1464,7 +1464,8 @@ functions to the next and/or previous version.")
                 "07lnj4yzwvwyh5fhpp1dxrys4ddih15jhgqjn59pmgxinbnddi66"))))
     (build-system dune-build-system)
     (arguments
-     `(#:test-target "."))
+     `(#:test-target "."
+       #:package "ppx_tools_versioned"))
     (propagated-inputs
      `(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)))
     (properties `((upstream-name . "ppx_tools_versioned")))
-- 
2.28.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #7: 0006-gnu-ocamlify-Perform-bootstrap-build.patch --]
[-- Type: text/x-patch, Size: 2568 bytes --]

From 6b08d42d9ebaa3ee6da4a9f8aa9cc6d70cf19231 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 16 Oct 2020 17:06:53 +0200
Subject: [PATCH 6/7] gnu: ocamlify: Perform bootstrap build.

* gnu/packages/ocaml.scm (ocamlify): Perform bootstrap build.
---
 gnu/packages/ocaml.scm | 29 ++++++++++++++++++-----------
 1 file changed, 18 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 15ca326376..660aeef25a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2433,21 +2433,28 @@ radix-64 representation.  It is specified in RFC 4648.")
         (base32 "1f0fghvlbfryf5h3j4as7vcqrgfjb4c8abl5y0y5h069vs4kp5ii"))))
     (build-system ocaml-build-system)
     (arguments
-     `(#:phases
+     `(#:tests? #f; no tests
+       #:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'disable-safe-string
-           ;; Work around ‘Error: This expression has type string but an
-           ;; expression was expected of type bytes’ since OCaml 4.06.
+         (delete 'configure)
+         (replace 'build
+           ;; This package uses pre-generated setup.ml by oasis, but is
+           ;; a dependency of oasis.  the pre-generated setup.ml is broken
+           ;; with recent versions of OCaml, so we perform a bootstrap instead.
            (lambda _
-             (setenv "OCAMLPARAM" "safe-string=0,_")
+             (substitute* "src/OCamlifyConfig.ml.ab"
+               (("$pkg_version") ,version))
+             (rename-file "src/OCamlifyConfig.ml.ab" "src/OCamlifyConfig.ml")
+             (with-directory-excursion "src"
+               (invoke "ocamlc" "OCamlifyConfig.ml" "ocamlify.ml" "-o"
+                       "ocamlify"))
              #t))
-         (delete 'check)                ; tests are run during the build
-         (replace 'configure
+         (replace 'install
            (lambda* (#:key outputs #:allow-other-keys)
-             (invoke "ocaml" "setup.ml" "-configure" "--prefix"
-                     (assoc-ref outputs "out")))))))
-    (native-inputs
-     `(("ocamlbuild" ,ocamlbuild)))
+             (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
+               (mkdir-p bin)
+               (install-file "src/ocamlify" bin)
+               #t))))))
     (home-page "https://forge.ocamlcore.org/projects/ocamlify")
     (synopsis "Include files in OCaml code")
     (description "OCamlify creates OCaml source code by including
-- 
2.28.0


[-- Attachment #8: 0007-gnu-ocaml-Switch-to-4.11-by-default.patch --]
[-- Type: text/x-patch, Size: 820 bytes --]

From 0c2ba2bf29d4a72fe05710a84ca2ca548801702a Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Fri, 16 Oct 2020 17:07:45 +0200
Subject: [PATCH 7/7] gnu: ocaml: Switch to 4.11 by default.

* gnu/packages/ocaml.scm (ocaml): Switch to 4.11 by default.
---
 gnu/packages/ocaml.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 660aeef25a..e486a09fbb 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -243,7 +243,7 @@ functional, imperative and object-oriented styles of programming.")
                           "--prefix" out
                           "--mandir" mandir))))))))))
 
-(define-public ocaml ocaml-4.09)
+(define-public ocaml ocaml-4.11)
 
 (define-public ocamlbuild
   (package
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#44032] [PATCH] gnu: ocaml: Update to 4.11.1
  2020-10-16 15:14 [bug#44032] [PATCH] gnu: ocaml: Update to 4.11.1 Julien Lepiller
@ 2020-10-16 19:21 ` Brett Gilio
  2020-10-19 13:31 ` zimoun
  1 sibling, 0 replies; 7+ messages in thread
From: Brett Gilio @ 2020-10-16 19:21 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: 44032

Julien Lepiller <julien@lepiller.eu> writes:

> Hi Guix!
>
> this small patch series update ocaml to 4.11.1. The first patch adds
> ocaml 4.11.1, the second adds findlib for 4.09, the third add
> package-with-ocaml4.09 (along with ocaml4.09-dune, which I can't put in
> a separate patch without breaking something). Then, three patches fix
> the build of three packages (with these patches, they build fine with
> 4.09 and 4.11).  The last patch performs the final switch to 4.11.
> Easier than I expected! :)
>
> Note that with that, previously unreproducible packages are
> reproducible!
>

Great work Julien! We are also working on this on the Debian side as
well. I am looking forward to seeing 4.11.1 hit Guix master. Thanks a
lot for your and other's hard work on this.

-- 
Brett M. Gilio
brettg@gnu.org
https://brettgilio.com/
E82A C026 95D6 FF02 43CA 1E5C F6C5 2DD1 BA27 CB87




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#44032] [PATCH] gnu: ocaml: Update to 4.11.1
  2020-10-16 15:14 [bug#44032] [PATCH] gnu: ocaml: Update to 4.11.1 Julien Lepiller
  2020-10-16 19:21 ` Brett Gilio
@ 2020-10-19 13:31 ` zimoun
  2020-10-19 14:11   ` Julien Lepiller
  1 sibling, 1 reply; 7+ messages in thread
From: zimoun @ 2020-10-19 13:31 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: 44032

Hi!

On Fri, 16 Oct 2020 at 17:14, Julien Lepiller <julien@lepiller.eu> wrote:

> Note that with that, previously unreproducible packages are
> reproducible!

I have not checked yet this point. :-)


>>From 2dc52a0077ffe1f0b416032fb1dfbf035f82c34e Mon Sep 17 00:00:00 2001
> From: Julien Lepiller <julien@lepiller.eu>
> Date: Thu, 15 Oct 2020 22:02:56 +0200
> Subject: [PATCH 1/7] gnu: ocaml: Update to 4.11.1.
>
> * gnu/packages/ocaml.scm (ocaml): Update to 4.11.1.
> ---
>  gnu/packages/ocaml.scm | 20 +++++++++++++++++---
>  1 file changed, 17 insertions(+), 3 deletions(-)

LTGM!


>>From 2b5fa1b7f30e7ff0315a752e10e87930e72dbb8e Mon Sep 17 00:00:00 2001
> From: Julien Lepiller <julien@lepiller.eu>
> Date: Thu, 15 Oct 2020 22:04:36 +0200
> Subject: [PATCH 2/7] gnu: Add ocaml4.09-findlib.
>
> * gnu/packages/ocaml.scm (ocaml4.09-findlib): New variable.
> ---
>  gnu/packages/ocaml.scm | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
> index be2f486179..84daa8afca 100644
> --- a/gnu/packages/ocaml.scm
> +++ b/gnu/packages/ocaml.scm
> @@ -1007,6 +1007,14 @@ compilers that can directly deal with packages.")
>       `(("m4" ,m4)
>         ("ocaml" ,ocaml-4.07)))))
>  
> +(define-public ocaml4.09-findlib
> +  (package
> +    (inherit ocaml-findlib)
> +    (name "ocaml4.09-findlib")
> +    (native-inputs
> +     `(("m4" ,m4)
> +       ("ocaml" ,ocaml-4.09)))))
> +
>  ;; note that some tests may hang for no obvious reason.
>  (define-public ocaml-ounit
>    (package
> -- 
> 2.28.0

LGTM!  Even if I was confused at first by: :-)

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix build ocaml4.09-findlib
/gnu/store/p49l1cr1wmf53szd5k4s2nx9n3p3qfc3-ocaml4.09-findlib-1.8.1

$ guix build ocaml-findlib
/gnu/store/n791rs3wvbm0fpmd0bqfhb3f4ysjwqia-ocaml-findlib-1.8.1

$ ./pre-inst-env guix build ocaml-findlib
/gnu/store/n791rs3wvbm0fpmd0bqfhb3f4ysjwqia-ocaml-findlib-1.8.1
--8<---------------cut here---------------end--------------->8---


>>From a810e6647ba30aba02b58840101ee66b7fbcd792 Mon Sep 17 00:00:00 2001
> From: Julien Lepiller <julien@lepiller.eu>
> Date: Thu, 15 Oct 2020 22:34:38 +0200
> Subject: [PATCH 3/7] guix: ocaml: Add package-with-ocaml4.09.
>
> * guix/build-system/ocaml.scm (package-with-ocaml4.09)
> (strip-ocaml4.09-variant): New variables.
> * gnu/packages/ocaml.scm (ocaml4.09-result, ocaml4.09-csexp)
> (ocaml4.09-dune-configurator, ocaml4.09-dune): New variables.
> ---
>  gnu/packages/ocaml.scm      | 46 ++++++++++++++++++++++++++++++++++++-
>  guix/build-system/ocaml.scm | 27 ++++++++++++++++++++++
>  2 files changed, 72 insertions(+), 1 deletion(-)

[...]
  
> +(define-public ocaml4.09-dune-configurator
> +  (package
> +    (inherit dune-configurator)
> +    (name "ocaml4.09-dune-configurator")
> +    (arguments
> +     `(#:package "dune-configurator"
> +       #:tests? #f
> +       #:dune ,(package-with-ocaml4.09 dune-bootstrap)
> +       #:ocaml ,ocaml-4.09
> +       #:findlib ,ocaml4.09-findlib))
> +    (propagated-inputs
> +     `(("ocaml-csexp" ,(package-with-ocaml4.09 ocaml-csexp))))))

As I wrote in the other thread about updating Dune, it looks ackward to
me the use the 'package-with-ocaml4.09' inside and not wrap outside...

>  (define-public dune
>    (package
>      (inherit dune-bootstrap)
>      (propagated-inputs
>       `(("dune-configurator" ,dune-configurator)))
> -    (properties `((ocaml4.07-variant . ,(delay ocaml4.07-dune))))))
> +    (properties `((ocaml4.07-variant . ,(delay ocaml4.07-dune))
> +                  (ocaml4.09-variant . ,(delay ocaml4.09-dune))))))

...especially these 'delay' in properties.  But I got your
arguments. :-) 


> +(define-public ocaml4.09-dune
> +  (package
> +    (inherit (package-with-ocaml4.09 dune-bootstrap))
> +    (propagated-inputs
> +     `(("dune-configurator" ,dune-configurator)))))

[...]

> +(define-public ocaml4.09-csexp
> +  (package
> +    (inherit ocaml-csexp)
> +    (name "ocaml4.09-csexp")
> +    (arguments
> +     `(#:ocaml ,ocaml-4.09
> +       #:findlib ,ocaml4.09-findlib
> +       ,@(substitute-keyword-arguments (package-arguments ocaml-csexp)
> +           ((#:dune _) (package-with-ocaml4.09 dune-bootstrap)))))
> +    (propagated-inputs
> +     `(("ocaml-result" ,(package-with-ocaml4.09 ocaml-result))))))

You do not use the one you define below.  Why?  Other said, do you
really need 'ocaml4.09.result' defined below?

> +
>  (define-public ocaml-migrate-parsetree
>    (package
>      (name "ocaml-migrate-parsetree")
> @@ -1494,12 +1528,22 @@ powerful.")
>      (arguments
>       `(#:test-target "."
>         #:dune ,dune-bootstrap))
> +    (properties `((ocaml4.09-variant . ,(delay ocaml4.09-result))))

Does it fail if instead

    (properties `((ocaml4.09-variant . ,(package-with-ocaml4.09 ocaml-result)))

?


> +(define-public ocaml4.09-result
> +  (package
> +    (inherit ocaml-result)
> +    (arguments
> +     `(#:test-target "."
> +       #:dune ,(package-with-ocaml4.09 dune-bootstrap)
> +       #:ocaml ,ocaml-4.09
> +       #:findlib ,ocaml4.09-findlib))))

Since the name is not changed after inheritance, this package is
ambiguous.  And possibly do not compile.


Otherwise, LGTM.


>>From 447de03a51a39fa7a7d8c5216c8ba23e632d0b88 Mon Sep 17 00:00:00 2001
> From: Julien Lepiller <julien@lepiller.eu>
> Date: Fri, 16 Oct 2020 17:01:40 +0200
> Subject: [PATCH 4/7] gnu: laby: Update to 0.7.0.
>
> * gnu/packages/games.scm (laby): Update to 0.7.0.
> ---
>  gnu/packages/games.scm | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

I am not sure to get why this one needs update instead of replacing
'ocaml' by 'ocaml4.09'.  And the update in other patch set.  Well,
bikeshed. :-)

LGTM.


>>From cb1c4f34d558b3b0b3cfc2d21d77c3d703f6013c Mon Sep 17 00:00:00 2001
> From: Julien Lepiller <julien@lepiller.eu>
> Date: Fri, 16 Oct 2020 17:02:56 +0200
> Subject: [PATCH 5/7] gnu: ocaml-ppx-tools-versioned: Use release profile.
>
> * gnu/packages/ocaml.scm (ocaml-ppx-tools-versioned): Use release
> profile.
> ---
>  gnu/packages/ocaml.scm | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

LGTM!


> From 6b08d42d9ebaa3ee6da4a9f8aa9cc6d70cf19231 Mon Sep 17 00:00:00 2001
> From: Julien Lepiller <julien@lepiller.eu>
> Date: Fri, 16 Oct 2020 17:06:53 +0200
> Subject: [PATCH 6/7] gnu: ocamlify: Perform bootstrap build.
>
> * gnu/packages/ocaml.scm (ocamlify): Perform bootstrap build.
> ---
>  gnu/packages/ocaml.scm | 29 ++++++++++++++++++-----------
>  1 file changed, 18 insertions(+), 11 deletions(-)
>
> diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
> index 15ca326376..660aeef25a 100644
> --- a/gnu/packages/ocaml.scm
> +++ b/gnu/packages/ocaml.scm
> @@ -2433,21 +2433,28 @@ radix-64 representation.  It is specified in RFC 4648.")
>          (base32 "1f0fghvlbfryf5h3j4as7vcqrgfjb4c8abl5y0y5h069vs4kp5ii"))))
>      (build-system ocaml-build-system)
>      (arguments
> -     `(#:phases
> +     `(#:tests? #f; no tests

Why?  Because the tests are run during the build?  If yes, does it make
sense to move the comment there?

> +       #:phases

[...]

>               #t))
> -         (delete 'check)                ; tests are run during the build

[...]

>      (home-page "https://forge.ocamlcore.org/projects/ocamlify")
>      (synopsis "Include files in OCaml code")
>      (description "OCamlify creates OCaml source code by including

Otherwise, LGTM!


>>From 0c2ba2bf29d4a72fe05710a84ca2ca548801702a Mon Sep 17 00:00:00 2001
> From: Julien Lepiller <julien@lepiller.eu>
> Date: Fri, 16 Oct 2020 17:07:45 +0200
> Subject: [PATCH 7/7] gnu: ocaml: Switch to 4.11 by default.
>
> * gnu/packages/ocaml.scm (ocaml): Switch to 4.11 by default.
> ---
>  gnu/packages/ocaml.scm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
> index 660aeef25a..e486a09fbb 100644
> --- a/gnu/packages/ocaml.scm
> +++ b/gnu/packages/ocaml.scm
> @@ -243,7 +243,7 @@ functional, imperative and object-oriented styles of programming.")
>                            "--prefix" out
>                            "--mandir" mandir))))))))))
>  
> -(define-public ocaml ocaml-4.09)
> +(define-public ocaml ocaml-4.11)
>  
>  (define-public ocamlbuild
>    (package

Cool!  LGTM!


All the best,
simon




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#44032] [PATCH] gnu: ocaml: Update to 4.11.1
  2020-10-19 13:31 ` zimoun
@ 2020-10-19 14:11   ` Julien Lepiller
  2020-10-19 14:24     ` zimoun
  0 siblings, 1 reply; 7+ messages in thread
From: Julien Lepiller @ 2020-10-19 14:11 UTC (permalink / raw)
  To: zimoun; +Cc: 44032



Le 19 octobre 2020 09:31:32 GMT-04:00, zimoun <zimon.toutoune@gmail.com> a écrit :
>Hi!
>
>On Fri, 16 Oct 2020 at 17:14, Julien Lepiller <julien@lepiller.eu>
>wrote:
>
>> Note that with that, previously unreproducible packages are
>> reproducible!
>
>I have not checked yet this point. :-)

Thanks for the review!

>
>
>>>From 2dc52a0077ffe1f0b416032fb1dfbf035f82c34e Mon Sep 17 00:00:00
>2001
>> From: Julien Lepiller <julien@lepiller.eu>
>> Date: Thu, 15 Oct 2020 22:02:56 +0200
>> Subject: [PATCH 1/7] gnu: ocaml: Update to 4.11.1.
>>
>> * gnu/packages/ocaml.scm (ocaml): Update to 4.11.1.
>> ---
>>  gnu/packages/ocaml.scm | 20 +++++++++++++++++---
>>  1 file changed, 17 insertions(+), 3 deletions(-)
>
>LTGM!
>
>
>>>From 2b5fa1b7f30e7ff0315a752e10e87930e72dbb8e Mon Sep 17 00:00:00
>2001
>> From: Julien Lepiller <julien@lepiller.eu>
>> Date: Thu, 15 Oct 2020 22:04:36 +0200
>> Subject: [PATCH 2/7] gnu: Add ocaml4.09-findlib.
>>
>> * gnu/packages/ocaml.scm (ocaml4.09-findlib): New variable.
>> ---
>>  gnu/packages/ocaml.scm | 8 ++++++++
>>  1 file changed, 8 insertions(+)
>>
>> diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
>> index be2f486179..84daa8afca 100644
>> --- a/gnu/packages/ocaml.scm
>> +++ b/gnu/packages/ocaml.scm
>> @@ -1007,6 +1007,14 @@ compilers that can directly deal with
>packages.")
>>       `(("m4" ,m4)
>>         ("ocaml" ,ocaml-4.07)))))
>>  
>> +(define-public ocaml4.09-findlib
>> +  (package
>> +    (inherit ocaml-findlib)
>> +    (name "ocaml4.09-findlib")
>> +    (native-inputs
>> +     `(("m4" ,m4)
>> +       ("ocaml" ,ocaml-4.09)))))
>> +
>>  ;; note that some tests may hang for no obvious reason.
>>  (define-public ocaml-ounit
>>    (package
>> -- 
>> 2.28.0
>
>LGTM!  Even if I was confused at first by: :-)

The goal is to switcg to ocaml 4.11 by default, so after the switcg we need a way to express pcakages with ocaml 4.09 :)

>
>--8<---------------cut here---------------start------------->8---
>$ ./pre-inst-env guix build ocaml4.09-findlib
>/gnu/store/p49l1cr1wmf53szd5k4s2nx9n3p3qfc3-ocaml4.09-findlib-1.8.1
>
>$ guix build ocaml-findlib
>/gnu/store/n791rs3wvbm0fpmd0bqfhb3f4ysjwqia-ocaml-findlib-1.8.1
>
>$ ./pre-inst-env guix build ocaml-findlib
>/gnu/store/n791rs3wvbm0fpmd0bqfhb3f4ysjwqia-ocaml-findlib-1.8.1
>--8<---------------cut here---------------end--------------->8---
>
>
>>>From a810e6647ba30aba02b58840101ee66b7fbcd792 Mon Sep 17 00:00:00
>2001
>> From: Julien Lepiller <julien@lepiller.eu>
>> Date: Thu, 15 Oct 2020 22:34:38 +0200
>> Subject: [PATCH 3/7] guix: ocaml: Add package-with-ocaml4.09.
>>
>> * guix/build-system/ocaml.scm (package-with-ocaml4.09)
>> (strip-ocaml4.09-variant): New variables.
>> * gnu/packages/ocaml.scm (ocaml4.09-result, ocaml4.09-csexp)
>> (ocaml4.09-dune-configurator, ocaml4.09-dune): New variables.
>> ---
>>  gnu/packages/ocaml.scm      | 46
>++++++++++++++++++++++++++++++++++++-
>>  guix/build-system/ocaml.scm | 27 ++++++++++++++++++++++
>>  2 files changed, 72 insertions(+), 1 deletion(-)
>
>[...]
>  
>> +(define-public ocaml4.09-dune-configurator
>> +  (package
>> +    (inherit dune-configurator)
>> +    (name "ocaml4.09-dune-configurator")
>> +    (arguments
>> +     `(#:package "dune-configurator"
>> +       #:tests? #f
>> +       #:dune ,(package-with-ocaml4.09 dune-bootstrap)
>> +       #:ocaml ,ocaml-4.09
>> +       #:findlib ,ocaml4.09-findlib))
>> +    (propagated-inputs
>> +     `(("ocaml-csexp" ,(package-with-ocaml4.09 ocaml-csexp))))))
>
>As I wrote in the other thread about updating Dune, it looks ackward to
>me the use the 'package-with-ocaml4.09' inside and not wrap outside...

I understand this is confusing. The issue is that package-with-ocaml4.09 uses ocaml4.09-dune, but ocaml4.09-dune-configurator (as well as csexp and result) are dependencies of dune.

So I define them separately, and use the properties field, so I can use package-with-ocaml4.09, and use the variant I define, instead of the default.

>
>>  (define-public dune
>>    (package
>>      (inherit dune-bootstrap)
>>      (propagated-inputs
>>       `(("dune-configurator" ,dune-configurator)))
>> -    (properties `((ocaml4.07-variant . ,(delay ocaml4.07-dune))))))
>> +    (properties `((ocaml4.07-variant . ,(delay ocaml4.07-dune))
>> +                  (ocaml4.09-variant . ,(delay ocaml4.09-dune))))))
>
>...especially these 'delay' in properties.  But I got your
>arguments. :-) 
>
>
>> +(define-public ocaml4.09-dune
>> +  (package
>> +    (inherit (package-with-ocaml4.09 dune-bootstrap))
>> +    (propagated-inputs
>> +     `(("dune-configurator" ,dune-configurator)))))
>
>[...]

Uh oh this is an issue I think :)

>
>> +(define-public ocaml4.09-csexp
>> +  (package
>> +    (inherit ocaml-csexp)
>> +    (name "ocaml4.09-csexp")
>> +    (arguments
>> +     `(#:ocaml ,ocaml-4.09
>> +       #:findlib ,ocaml4.09-findlib
>> +       ,@(substitute-keyword-arguments (package-arguments
>ocaml-csexp)
>> +           ((#:dune _) (package-with-ocaml4.09 dune-bootstrap)))))
>> +    (propagated-inputs
>> +     `(("ocaml-result" ,(package-with-ocaml4.09 ocaml-result))))))
>
>You do not use the one you define below.  Why?  Other said, do you
>really need 'ocaml4.09.result' defined below?

Actually, the properties ensure that I actually use the one below :)

>
>> +
>>  (define-public ocaml-migrate-parsetree
>>    (package
>>      (name "ocaml-migrate-parsetree")
>> @@ -1494,12 +1528,22 @@ powerful.")
>>      (arguments
>>       `(#:test-target "."
>>         #:dune ,dune-bootstrap))
>> +    (properties `((ocaml4.09-variant . ,(delay ocaml4.09-result))))
>
>Does it fail if instead
>
>(properties `((ocaml4.09-variant . ,(package-with-ocaml4.09
>ocaml-result)))

Ah no, that should be fine, thanks.

>
>?
>
>
>> +(define-public ocaml4.09-result
>> +  (package
>> +    (inherit ocaml-result)
>> +    (arguments
>> +     `(#:test-target "."
>> +       #:dune ,(package-with-ocaml4.09 dune-bootstrap)
>> +       #:ocaml ,ocaml-4.09
>> +       #:findlib ,ocaml4.09-findlib))))
>
>Since the name is not changed after inheritance, this package is
>ambiguous.  And possibly do not compile.

Ah right, thanks!

>
>
>Otherwise, LGTM.
>
>
>>>From 447de03a51a39fa7a7d8c5216c8ba23e632d0b88 Mon Sep 17 00:00:00
>2001
>> From: Julien Lepiller <julien@lepiller.eu>
>> Date: Fri, 16 Oct 2020 17:01:40 +0200
>> Subject: [PATCH 4/7] gnu: laby: Update to 0.7.0.
>>
>> * gnu/packages/games.scm (laby): Update to 0.7.0.
>> ---
>>  gnu/packages/games.scm | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>
>I am not sure to get why this one needs update instead of replacing
>'ocaml' by 'ocaml4.09'.  And the update in other patch set.  Well,
>bikeshed. :-)
>
>LGTM.
>
>
>>>From cb1c4f34d558b3b0b3cfc2d21d77c3d703f6013c Mon Sep 17 00:00:00
>2001
>> From: Julien Lepiller <julien@lepiller.eu>
>> Date: Fri, 16 Oct 2020 17:02:56 +0200
>> Subject: [PATCH 5/7] gnu: ocaml-ppx-tools-versioned: Use release
>profile.
>>
>> * gnu/packages/ocaml.scm (ocaml-ppx-tools-versioned): Use release
>> profile.
>> ---
>>  gnu/packages/ocaml.scm | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>
>LGTM!
>
>
>> From 6b08d42d9ebaa3ee6da4a9f8aa9cc6d70cf19231 Mon Sep 17 00:00:00
>2001
>> From: Julien Lepiller <julien@lepiller.eu>
>> Date: Fri, 16 Oct 2020 17:06:53 +0200
>> Subject: [PATCH 6/7] gnu: ocamlify: Perform bootstrap build.
>>
>> * gnu/packages/ocaml.scm (ocamlify): Perform bootstrap build.
>> ---
>>  gnu/packages/ocaml.scm | 29 ++++++++++++++++++-----------
>>  1 file changed, 18 insertions(+), 11 deletions(-)
>>
>> diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
>> index 15ca326376..660aeef25a 100644
>> --- a/gnu/packages/ocaml.scm
>> +++ b/gnu/packages/ocaml.scm
>> @@ -2433,21 +2433,28 @@ radix-64 representation.  It is specified in
>RFC 4648.")
>>          (base32
>"1f0fghvlbfryf5h3j4as7vcqrgfjb4c8abl5y0y5h069vs4kp5ii"))))
>>      (build-system ocaml-build-system)
>>      (arguments
>> -     `(#:phases
>> +     `(#:tests? #f; no tests
>
>Why?  Because the tests are run during the build?  If yes, does it make
>sense to move the comment there?

No, the comment might have come from a previous version or just copied by mistake. There is really no test in this package (unless there's something weird going on with oasis scripts).

>
>> +       #:phases
>
>[...]
>
>>               #t))
>> -         (delete 'check)                ; tests are run during the
>build
>
>[...]
>
>>      (home-page "https://forge.ocamlcore.org/projects/ocamlify")
>>      (synopsis "Include files in OCaml code")
>>      (description "OCamlify creates OCaml source code by including
>
>Otherwise, LGTM!
>
>
>>>From 0c2ba2bf29d4a72fe05710a84ca2ca548801702a Mon Sep 17 00:00:00
>2001
>> From: Julien Lepiller <julien@lepiller.eu>
>> Date: Fri, 16 Oct 2020 17:07:45 +0200
>> Subject: [PATCH 7/7] gnu: ocaml: Switch to 4.11 by default.
>>
>> * gnu/packages/ocaml.scm (ocaml): Switch to 4.11 by default.
>> ---
>>  gnu/packages/ocaml.scm | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
>> index 660aeef25a..e486a09fbb 100644
>> --- a/gnu/packages/ocaml.scm
>> +++ b/gnu/packages/ocaml.scm
>> @@ -243,7 +243,7 @@ functional, imperative and object-oriented styles
>of programming.")
>>                            "--prefix" out
>>                            "--mandir" mandir))))))))))
>>  
>> -(define-public ocaml ocaml-4.09)
>> +(define-public ocaml ocaml-4.11)
>>  
>>  (define-public ocamlbuild
>>    (package
>
>Cool!  LGTM!
>
>
>All the best,
>simon




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#44032] [PATCH] gnu: ocaml: Update to 4.11.1
  2020-10-19 14:11   ` Julien Lepiller
@ 2020-10-19 14:24     ` zimoun
  2020-10-19 15:14       ` Julien Lepiller
  0 siblings, 1 reply; 7+ messages in thread
From: zimoun @ 2020-10-19 14:24 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: 44032

On Mon, 19 Oct 2020 at 16:11, Julien Lepiller <julien@lepiller.eu> wrote:

> >> +(define-public ocaml4.09-csexp
> >> +  (package
> >> +    (inherit ocaml-csexp)
> >> +    (name "ocaml4.09-csexp")
> >> +    (arguments
> >> +     `(#:ocaml ,ocaml-4.09
> >> +       #:findlib ,ocaml4.09-findlib
> >> +       ,@(substitute-keyword-arguments (package-arguments
> >ocaml-csexp)
> >> +           ((#:dune _) (package-with-ocaml4.09 dune-bootstrap)))))
> >> +    (propagated-inputs
> >> +     `(("ocaml-result" ,(package-with-ocaml4.09 ocaml-result))))))
> >
> >You do not use the one you define below.  Why?  Other said, do you
> >really need 'ocaml4.09.result' defined below?
>
> Actually, the properties ensure that I actually use the one below :)

I am not sure.  You are recreating a package based on 'ocaml-result'
and not using the package 'ocaml4.09-result'.  Or I miss something
about the symbols.


> >> +(define-public ocaml4.09-result
> >> +  (package
> >> +    (inherit ocaml-result)
> >> +    (arguments
> >> +     `(#:test-target "."
> >> +       #:dune ,(package-with-ocaml4.09 dune-bootstrap)
> >> +       #:ocaml ,ocaml-4.09
> >> +       #:findlib ,ocaml4.09-findlib))))
> >
> >Since the name is not changed after inheritance, this package is
> >ambiguous.  And possibly do not compile.
>
> Ah right, thanks!

Moreover, my point is: you are using

 once:
    (properties `((ocaml4.09-variant . ,(delay ocaml4.09-result))))
and once:
     `(("ocaml-result" ,(package-with-ocaml4.09 ocaml-result))))))

and it seems easier to only use one form.  Other said, maybe you do
not need the new 'ocaml4.09-result' and '(package-with-ocaml4.09
ocaml-result)' is enough.


> >> -     `(#:phases
> >> +     `(#:tests? #f; no tests
> >
> >Why?  Because the tests are run during the build?  If yes, does it make
> >sense to move the comment there?
>
> No, the comment might have come from a previous version or just copied by mistake. There is really no test in this package (unless there's something weird going on with oasis scripts).

Maybe reword the comment: "no test provided by the package"or
something like that.


All the best,
simon




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#44032] [PATCH] gnu: ocaml: Update to 4.11.1
  2020-10-19 14:24     ` zimoun
@ 2020-10-19 15:14       ` Julien Lepiller
  2020-11-10 15:07         ` bug#44032: " Julien Lepiller
  0 siblings, 1 reply; 7+ messages in thread
From: Julien Lepiller @ 2020-10-19 15:14 UTC (permalink / raw)
  To: zimoun; +Cc: 44032



Le 19 octobre 2020 10:24:23 GMT-04:00, zimoun <zimon.toutoune@gmail.com> a écrit :
>On Mon, 19 Oct 2020 at 16:11, Julien Lepiller <julien@lepiller.eu>
>wrote:
>
>> >> +(define-public ocaml4.09-csexp
>> >> +  (package
>> >> +    (inherit ocaml-csexp)
>> >> +    (name "ocaml4.09-csexp")
>> >> +    (arguments
>> >> +     `(#:ocaml ,ocaml-4.09
>> >> +       #:findlib ,ocaml4.09-findlib
>> >> +       ,@(substitute-keyword-arguments (package-arguments
>> >ocaml-csexp)
>> >> +           ((#:dune _) (package-with-ocaml4.09
>dune-bootstrap)))))
>> >> +    (propagated-inputs
>> >> +     `(("ocaml-result" ,(package-with-ocaml4.09
>ocaml-result))))))
>> >
>> >You do not use the one you define below.  Why?  Other said, do you
>> >really need 'ocaml4.09.result' defined below?
>>
>> Actually, the properties ensure that I actually use the one below :)
>
>I am not sure.  You are recreating a package based on 'ocaml-result'
>and not using the package 'ocaml4.09-result'.  Or I miss something
>about the symbols.

package-with-ocaml4.09 first reads the properties field of its arguments, and if it has an ocaml4.09-variant,it uses it. Otherwise it creates a new package that uses ocaml 4.09, ocaml4.09-findlib and ocaml4.09-dune.

If you remove the property in ocaml-result, you'll see that building (package-with-ocaml4.09 result) ends up in a loop: it wants ocaml4.09-dune, but is itself a dependency of ocaml4.09-dune.

>
>
>> >> +(define-public ocaml4.09-result
>> >> +  (package
>> >> +    (inherit ocaml-result)
>> >> +    (arguments
>> >> +     `(#:test-target "."
>> >> +       #:dune ,(package-with-ocaml4.09 dune-bootstrap)
>> >> +       #:ocaml ,ocaml-4.09
>> >> +       #:findlib ,ocaml4.09-findlib))))
>> >
>> >Since the name is not changed after inheritance, this package is
>> >ambiguous.  And possibly do not compile.
>>
>> Ah right, thanks!
>
>Moreover, my point is: you are using
>
> once:
>    (properties `((ocaml4.09-variant . ,(delay ocaml4.09-result))))
>and once:
>     `(("ocaml-result" ,(package-with-ocaml4.09 ocaml-result))))))
>
>and it seems easier to only use one form.  Other said, maybe you do
>not need the new 'ocaml4.09-result' and '(package-with-ocaml4.09
>ocaml-result)' is enough.

OK, I'll use the variant I define everywhere if it makes things easier to understand later.

>
>
>> >> -     `(#:phases
>> >> +     `(#:tests? #f; no tests
>> >
>> >Why?  Because the tests are run during the build?  If yes, does it
>make
>> >sense to move the comment there?
>>
>> No, the comment might have come from a previous version or just
>copied by mistake. There is really no test in this package (unless
>there's something weird going on with oasis scripts).
>
>Maybe reword the comment: "no test provided by the package"or
>something like that.
>
>
>All the best,
>simon




^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#44032: [PATCH] gnu: ocaml: Update to 4.11.1
  2020-10-19 15:14       ` Julien Lepiller
@ 2020-11-10 15:07         ` Julien Lepiller
  0 siblings, 0 replies; 7+ messages in thread
From: Julien Lepiller @ 2020-11-10 15:07 UTC (permalink / raw)
  To: zimoun; +Cc: 44032-done

Sorry for the delay! It's finally pushed as
0c8370824080991fa9fd3f2698aae13a9d4ec894 to
0a173fe25f3040d692c15fb26dace7eace9948e4

Thank you for the review!




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-11-10 15:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-16 15:14 [bug#44032] [PATCH] gnu: ocaml: Update to 4.11.1 Julien Lepiller
2020-10-16 19:21 ` Brett Gilio
2020-10-19 13:31 ` zimoun
2020-10-19 14:11   ` Julien Lepiller
2020-10-19 14:24     ` zimoun
2020-10-19 15:14       ` Julien Lepiller
2020-11-10 15:07         ` bug#44032: " Julien Lepiller

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.