GNU bug report logs - #69185
[PATCH master] gnu: ocaml: Update to 5.1.1

Previous Next

Package: guix-patches;

Reported by: Marc Coquand <marc <at> mccd.space>

Date: Sun, 18 Feb 2024 18:16:02 UTC

Severity: normal

Tags: moreinfo, patch

To reply to this bug, email your comments to 69185 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to julien <at> lepiller.eu, pukkamustard <at> posteo.net, guix-patches <at> gnu.org:
bug#69185; Package guix-patches. (Sun, 18 Feb 2024 18:16:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Marc Coquand <marc <at> mccd.space>:
New bug report received and forwarded. Copy sent to julien <at> lepiller.eu, pukkamustard <at> posteo.net, guix-patches <at> gnu.org. (Sun, 18 Feb 2024 18:16:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Marc Coquand <marc <at> mccd.space>
To: guix-patches <at> gnu.org
Cc: Marc Coquand <marc <at> mccd.space>
Subject: [PATCH master] gnu: ocaml: Update to 5.1.1
Date: Sat, 17 Feb 2024 11:39:29 -0600
* gnu/packages/ocaml.scm (ocaml): Update to 5.1.1

Change-Id: Ie95f2e31185a5f5ef345839d357d5768e4299fcc
---
 gnu/packages/ocaml.scm | 56 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 0f4c351141..f7b9f9b81a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -191,6 +191,62 @@ (define-public camlboot
 This package produces a native @command{ocamlc} and a bytecode @command{ocamllex}.")
       (license license:expat))))
 
+(define-public ocaml-5.1
+  (package
+    (name "ocaml")
+    (version "5.1.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/ocaml/ocaml")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "19sjc8r2c78y7g47jjxb1c30zzvkdhgy8yp3i1kkz1hm6nj96adr"))))
+    (build-system gnu-build-system)
+    (native-search-paths
+     (list (search-path-specification
+            (variable "OCAMLPATH")
+            (files (list "lib/ocaml" "lib/ocaml/site-lib")))
+           (search-path-specification
+            (variable "CAML_LD_LIBRARY_PATH")
+            (files (list "lib/ocaml/site-lib/stubslibs"
+                         "lib/ocaml/site-lib/stublibs")))))
+    (native-inputs (list perl pkg-config))
+    (inputs (list libx11 libiberty ;needed for objdump support
+                  zlib)) ;also needed for objdump support
+    (arguments
+     `(#:configure-flags '("--enable-ocamltest")
+       #:test-target "tests"
+       #:make-flags '("defaultentry")
+       #:phases (modify-phases %standard-phases
+                  (add-after 'unpack 'patch-/bin/sh-references
+                    (lambda* (#:key inputs #:allow-other-keys)
+                      (let* ((sh (search-input-file inputs "/bin/sh"))
+                             (quoted-sh (string-append "\"" sh "\"")))
+                        (with-fluids ((%default-port-encoding #f))
+                                     (for-each (lambda (file)
+                                                 (substitute* file
+                                                   (("\"/bin/sh\"")
+                                                    (begin
+                                                      (format (current-error-port)
+                                                       "patch-/bin/sh-references: ~a: changing `\"/bin/sh\"' to `~a'~%"
+                                                       file quoted-sh)
+                                                      quoted-sh))))
+                                               (find-files "." "\\.ml$")))))))))
+    (home-page "https://ocaml.org/")
+    (synopsis "The OCaml programming language")
+    (description
+     "OCaml is a general purpose industrial-strength programming language with
+an emphasis on expressiveness and safety.  Developed for more than 20 years at
+Inria it benefits from one of the most advanced type systems and supports
+functional, imperative and object-oriented styles of programming.")
+    ;; The compiler is distributed under qpl1.0 with a change to choice of
+    ;; law: the license is governed by the laws of France.  The library is
+    ;; distributed under lgpl2.0.
+    (license (list license:qpl license:lgpl2.0))))
+
 (define-public ocaml-5.0
   (package
     (name "ocaml")

base-commit: 3cf199dbcf85a44fa8370e786e568fc3feb7067c
-- 
2.43.2





Information forwarded to guix-patches <at> gnu.org:
bug#69185; Package guix-patches. (Sun, 24 Mar 2024 07:11:02 GMT) Full text and rfc822 format available.

Message #8 received at 69185 <at> debbugs.gnu.org (full text, mbox):

From: pukkamustard <pukkamustard <at> posteo.net>
To: Marc Coquand <marc <at> mccd.space>
Cc: 69185 <at> debbugs.gnu.org, Julien Lepiller <julien <at> lepiller.eu>,
 debbugs-submit <at> debbugs.gnu.org
Subject: Re: [bug#69185] [PATCH master] gnu: ocaml: Update to 5.1.1
Date: Sun, 24 Mar 2024 06:57:12 +0000
Thanks!

I wonder how useful the OCaml compiler itself is without a
`package-with-ocaml5.1` transformation? The `ocaml` package itself just
provides the compiler but no nice way (afaik) of using the compiler with
dependencies and all. Do you think it would make sense to add a
`package-with-ocaml5.1` transformation in `(guix build-system ocaml)`?

Maybe even better we can replace the OCaml 5.0 compiler with a newer
version. The only packages depending on ocaml-5.0 are ocaml5.0-merlin
and ocaml5.0-eio. They could be updated to use a newer OCaml
version. Maybe no point in keeping OCaml 5.0 around. What do you think?

-pukkamustard


Marc Coquand <marc <at> mccd.space> writes:

> * gnu/packages/ocaml.scm (ocaml): Update to 5.1.1
>
> Change-Id: Ie95f2e31185a5f5ef345839d357d5768e4299fcc
> ---
>  gnu/packages/ocaml.scm | 56 ++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 56 insertions(+)
>
> diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
> index 0f4c351141..f7b9f9b81a 100644
> --- a/gnu/packages/ocaml.scm
> +++ b/gnu/packages/ocaml.scm
> @@ -191,6 +191,62 @@ (define-public camlboot
>  This package produces a native @command{ocamlc} and a bytecode @command{ocamllex}.")
>        (license license:expat))))
>  
> +(define-public ocaml-5.1
> +  (package
> +    (name "ocaml")
> +    (version "5.1.1")
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "https://github.com/ocaml/ocaml")
> +             (commit version)))
> +       (file-name (git-file-name name version))
> +       (sha256
> +        (base32 "19sjc8r2c78y7g47jjxb1c30zzvkdhgy8yp3i1kkz1hm6nj96adr"))))
> +    (build-system gnu-build-system)
> +    (native-search-paths
> +     (list (search-path-specification
> +            (variable "OCAMLPATH")
> +            (files (list "lib/ocaml" "lib/ocaml/site-lib")))
> +           (search-path-specification
> +            (variable "CAML_LD_LIBRARY_PATH")
> +            (files (list "lib/ocaml/site-lib/stubslibs"
> +                         "lib/ocaml/site-lib/stublibs")))))
> +    (native-inputs (list perl pkg-config))
> +    (inputs (list libx11 libiberty ;needed for objdump support
> +                  zlib)) ;also needed for objdump support
> +    (arguments
> +     `(#:configure-flags '("--enable-ocamltest")
> +       #:test-target "tests"
> +       #:make-flags '("defaultentry")
> +       #:phases (modify-phases %standard-phases
> +                  (add-after 'unpack 'patch-/bin/sh-references
> +                    (lambda* (#:key inputs #:allow-other-keys)
> +                      (let* ((sh (search-input-file inputs "/bin/sh"))
> +                             (quoted-sh (string-append "\"" sh "\"")))
> +                        (with-fluids ((%default-port-encoding #f))
> +                                     (for-each (lambda (file)
> +                                                 (substitute* file
> +                                                   (("\"/bin/sh\"")
> +                                                    (begin
> +                                                      (format (current-error-port)
> +                                                       "patch-/bin/sh-references: ~a: changing `\"/bin/sh\"' to `~a'~%"
> +                                                       file quoted-sh)
> +                                                      quoted-sh))))
> +                                               (find-files "." "\\.ml$")))))))))
> +    (home-page "https://ocaml.org/")
> +    (synopsis "The OCaml programming language")
> +    (description
> +     "OCaml is a general purpose industrial-strength programming language with
> +an emphasis on expressiveness and safety.  Developed for more than 20 years at
> +Inria it benefits from one of the most advanced type systems and supports
> +functional, imperative and object-oriented styles of programming.")
> +    ;; The compiler is distributed under qpl1.0 with a change to choice of
> +    ;; law: the license is governed by the laws of France.  The library is
> +    ;; distributed under lgpl2.0.
> +    (license (list license:qpl license:lgpl2.0))))
> +
>  (define-public ocaml-5.0
>    (package
>      (name "ocaml")
>
> base-commit: 3cf199dbcf85a44fa8370e786e568fc3feb7067c





Information forwarded to guix-patches <at> gnu.org:
bug#69185; Package guix-patches. (Tue, 26 Mar 2024 21:18:01 GMT) Full text and rfc822 format available.

Message #11 received at 69185 <at> debbugs.gnu.org (full text, mbox):

From: pukkamustard <pukkamustard <at> posteo.net>
To: Marc Coquand <marc <at> mccd.space>
Cc: 69185 <at> debbugs.gnu.org
Subject: Re: [bug#69185] [PATCH master] gnu: ocaml: Update to 5.1.1
Date: Tue, 26 Mar 2024 21:03:49 +0000
Marc Coquand <marc <at> mccd.space> writes:

>> Do you think it would make sense to add a
>> `package-with-ocaml5.1` transformation in `(guix build-system ocaml)`?
>
> Absolutely, or replace the ocaml5.0 one.
>
>> Maybe even better we can replace the OCaml 5.0 compiler with a newer
>> version. The only packages depending on ocaml-5.0 are ocaml5.0-merlin
>> and ocaml5.0-eio. They could be updated to use a newer OCaml
>> version. Maybe no point in keeping OCaml 5.0 around. What do you think?
>
> I see there is also in packages/ocaml.scm:
>
> - ocaml5.0-merlin-reader
> - ocaml5.0-ppx-expect
> - ocaml5.0-dune-bootstrap
> - ocaml5.0-crowbar
> - ocaml5.0-findlib
>
> I assume that if we replace the old 5.0 version, we would need to bump
> these packages as well, since they use Ocaml 5.0?

Yes.

> I am relatively new to software packaging, so I do not know what best
> practice is here: if it is best to replace the old version or create an
> entry for the new version.

Hm, I'd say it's good to keep versions around that are being used by
other packages in Guix or it is a version where we can assume that
significant amount of people are using it from Guix for things outside
of Guix.

I think OCaml 5.0 is neither:

- The ocaml5.0-* packages are mostly to get a working development
  environment (ocaml5.0-merlin and dependencies).
- Our ocaml5.0-eio is outdated and the recently released Eio 1.0.0 only
  supports OCaml 5.1.1 or later.
- There's not much reason to use OCaml 5.0 when OCaml 5.1 is available.

I'd suggest replacing OCaml 5.0 with OCaml 5.1 in Guix.

Happy hacking!

-pukkamustard

> pukkamustard <pukkamustard <at> posteo.net> writes:
>
>> Thanks!
>>
>> I wonder how useful the OCaml compiler itself is without a
>> `package-with-ocaml5.1` transformation? The `ocaml` package itself just
>> provides the compiler but no nice way (afaik) of using the compiler with
>> dependencies and all. Do you think it would make sense to add a
>> `package-with-ocaml5.1` transformation in `(guix build-system ocaml)`?
>>
>> Maybe even better we can replace the OCaml 5.0 compiler with a newer
>> version. The only packages depending on ocaml-5.0 are ocaml5.0-merlin
>> and ocaml5.0-eio. They could be updated to use a newer OCaml
>> version. Maybe no point in keeping OCaml 5.0 around. What do you think?
>>
>> -pukkamustard
>>
>>
>> Marc Coquand <marc <at> mccd.space> writes:
>>
>>> * gnu/packages/ocaml.scm (ocaml): Update to 5.1.1
>>>
>>> Change-Id: Ie95f2e31185a5f5ef345839d357d5768e4299fcc
>>> ---
>>>  gnu/packages/ocaml.scm | 56 ++++++++++++++++++++++++++++++++++++++++++
>>>  1 file changed, 56 insertions(+)
>>>
>>> diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
>>> index 0f4c351141..f7b9f9b81a 100644
>>> --- a/gnu/packages/ocaml.scm
>>> +++ b/gnu/packages/ocaml.scm
>>> @@ -191,6 +191,62 @@ (define-public camlboot
>>>  This package produces a native @command{ocamlc} and a bytecode @command{ocamllex}.")
>>>        (license license:expat))))
>>>  
>>> +(define-public ocaml-5.1
>>> +  (package
>>> +    (name "ocaml")
>>> +    (version "5.1.1")
>>> +    (source
>>> +     (origin
>>> +       (method git-fetch)
>>> +       (uri (git-reference
>>> +             (url "https://github.com/ocaml/ocaml")
>>> +             (commit version)))
>>> +       (file-name (git-file-name name version))
>>> +       (sha256
>>> +        (base32 "19sjc8r2c78y7g47jjxb1c30zzvkdhgy8yp3i1kkz1hm6nj96adr"))))
>>> +    (build-system gnu-build-system)
>>> +    (native-search-paths
>>> +     (list (search-path-specification
>>> +            (variable "OCAMLPATH")
>>> +            (files (list "lib/ocaml" "lib/ocaml/site-lib")))
>>> +           (search-path-specification
>>> +            (variable "CAML_LD_LIBRARY_PATH")
>>> +            (files (list "lib/ocaml/site-lib/stubslibs"
>>> +                         "lib/ocaml/site-lib/stublibs")))))
>>> +    (native-inputs (list perl pkg-config))
>>> +    (inputs (list libx11 libiberty ;needed for objdump support
>>> +                  zlib)) ;also needed for objdump support
>>> +    (arguments
>>> +     `(#:configure-flags '("--enable-ocamltest")
>>> +       #:test-target "tests"
>>> +       #:make-flags '("defaultentry")
>>> +       #:phases (modify-phases %standard-phases
>>> +                  (add-after 'unpack 'patch-/bin/sh-references
>>> +                    (lambda* (#:key inputs #:allow-other-keys)
>>> +                      (let* ((sh (search-input-file inputs "/bin/sh"))
>>> +                             (quoted-sh (string-append "\"" sh "\"")))
>>> +                        (with-fluids ((%default-port-encoding #f))
>>> +                                     (for-each (lambda (file)
>>> +                                                 (substitute* file
>>> +                                                   (("\"/bin/sh\"")
>>> +                                                    (begin
>>> +                                                      (format (current-error-port)
>>> +                                                       "patch-/bin/sh-references: ~a: changing `\"/bin/sh\"' to `~a'~%"
>>> +                                                       file quoted-sh)
>>> +                                                      quoted-sh))))
>>> +                                               (find-files "." "\\.ml$")))))))))
>>> +    (home-page "https://ocaml.org/")
>>> +    (synopsis "The OCaml programming language")
>>> +    (description
>>> +     "OCaml is a general purpose industrial-strength programming language with
>>> +an emphasis on expressiveness and safety.  Developed for more than 20 years at
>>> +Inria it benefits from one of the most advanced type systems and supports
>>> +functional, imperative and object-oriented styles of programming.")
>>> +    ;; The compiler is distributed under qpl1.0 with a change to choice of
>>> +    ;; law: the license is governed by the laws of France.  The library is
>>> +    ;; distributed under lgpl2.0.
>>> +    (license (list license:qpl license:lgpl2.0))))
>>> +
>>>  (define-public ocaml-5.0
>>>    (package
>>>      (name "ocaml")
>>>
>>> base-commit: 3cf199dbcf85a44fa8370e786e568fc3feb7067c





Information forwarded to guix-patches <at> gnu.org:
bug#69185; Package guix-patches. (Fri, 29 Mar 2024 22:20:02 GMT) Full text and rfc822 format available.

Message #14 received at 69185 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: pukkamustard <pukkamustard <at> posteo.net>
Cc: 69185 <at> debbugs.gnu.org, Marc Coquand <marc <at> mccd.space>
Subject: Re: bug#69185: [PATCH master] gnu: ocaml: Update to 5.1.1
Date: Fri, 29 Mar 2024 23:19:02 +0100
Hello pukkamustard,

pukkamustard <pukkamustard <at> posteo.net> skribis:

> Hm, I'd say it's good to keep versions around that are being used by
> other packages in Guix or it is a version where we can assume that
> significant amount of people are using it from Guix for things outside
> of Guix.
>
> I think OCaml 5.0 is neither:
>
> - The ocaml5.0-* packages are mostly to get a working development
>   environment (ocaml5.0-merlin and dependencies).
> - Our ocaml5.0-eio is outdated and the recently released Eio 1.0.0 only
>   supports OCaml 5.1.1 or later.
> - There's not much reason to use OCaml 5.0 when OCaml 5.1 is available.
>
> I'd suggest replacing OCaml 5.0 with OCaml 5.1 in Guix.

Can removing 5.0 be done in a followup patch?  Should we apply this
patch in this meantime, or would you suggest adjusting it beforehand?

Thanks,
Ludo’.




Added tag(s) moreinfo. Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 29 Mar 2024 22:20:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#69185; Package guix-patches. (Mon, 01 Apr 2024 06:28:02 GMT) Full text and rfc822 format available.

Message #19 received at 69185 <at> debbugs.gnu.org (full text, mbox):

From: pukkamustard <pukkamustard <at> posteo.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 69185 <at> debbugs.gnu.org, Marc Coquand <marc <at> mccd.space>
Subject: Re: bug#69185: [PATCH master] gnu: ocaml: Update to 5.1.1
Date: Mon, 01 Apr 2024 06:19:18 +0000
Hi Ludo`,

Ludovic Courtès <ludo <at> gnu.org> writes:

>
> Can removing 5.0 be done in a followup patch?  Should we apply this
> patch in this meantime, or would you suggest adjusting it beforehand?
>

Yes, that can be done. Might even be good to keep the update to 5.1.1 in
two smaller patche sets (one to add 5.1.1, one to remove 5.0.0).

I would suggest adding a package-with-ocaml5.1 transformation to this
patch series (as dependencies probably ocaml5.1-findlib and
ocaml5.1-dune). This would make the new compiler more directly usable
and would help in testing the new compiler for OCaml packages already in
Guix.

-pukkamustard




Information forwarded to guix-patches <at> gnu.org:
bug#69185; Package guix-patches. (Tue, 02 Apr 2024 15:51:02 GMT) Full text and rfc822 format available.

Message #22 received at 69185 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: pukkamustard <pukkamustard <at> posteo.net>
Cc: 69185 <at> debbugs.gnu.org, Julien Lepiller <julien <at> lepiller.eu>,
 Marc Coquand <marc <at> mccd.space>
Subject: Re: bug#69185: [PATCH master] gnu: ocaml: Update to 5.1.1
Date: Tue, 02 Apr 2024 17:50:13 +0200
Hello,

pukkamustard <pukkamustard <at> posteo.net> skribis:

> I would suggest adding a package-with-ocaml5.1 transformation to this
> patch series (as dependencies probably ocaml5.1-findlib and
> ocaml5.1-dune). This would make the new compiler more directly usable
> and would help in testing the new compiler for OCaml packages already in
> Guix.

Marc, could you look into adding this?

(I’m not on the OCaml team but I Cc’d Julien who’s one of them.  If
Julien is unavailable and pukkamustard gives a green light, I can apply
the revised patch on their behalf.)

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#69185; Package guix-patches. (Tue, 02 Apr 2024 17:46:01 GMT) Full text and rfc822 format available.

Message #25 received at 69185 <at> debbugs.gnu.org (full text, mbox):

From: Marc Coquand <marc <at> mccd.space>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: pukkamustard <pukkamustard <at> posteo.net>, 69185 <at> debbugs.gnu.org,
 Julien Lepiller <julien <at> lepiller.eu>, Marc Coquand <marc <at> mccd.space>
Subject: Re: bug#69185: [PATCH master] gnu: ocaml: Update to 5.1.1
Date: Tue, 02 Apr 2024 11:42:57 -0600
Hey!

I'll have a look at this when I have time, hopefully tomorrow or end of
the week.  :)

Sincerely,
Marc

Ludovic Courtès <ludo <at> gnu.org> writes:

> Hello,
>
> pukkamustard <pukkamustard <at> posteo.net> skribis:
>
>> I would suggest adding a package-with-ocaml5.1 transformation to this
>> patch series (as dependencies probably ocaml5.1-findlib and
>> ocaml5.1-dune). This would make the new compiler more directly usable
>> and would help in testing the new compiler for OCaml packages already in
>> Guix.
>
> Marc, could you look into adding this?
>
> (I’m not on the OCaml team but I Cc’d Julien who’s one of them.  If
> Julien is unavailable and pukkamustard gives a green light, I can apply
> the revised patch on their behalf.)
>
> Ludo’.





Information forwarded to guix-patches <at> gnu.org:
bug#69185; Package guix-patches. (Sun, 07 Apr 2024 22:05:01 GMT) Full text and rfc822 format available.

Message #28 received at 69185 <at> debbugs.gnu.org (full text, mbox):

From: Marc Coquand <marc <at> mccd.space>
To: Marc Coquand <marc <at> mccd.space>
Cc: pukkamustard <pukkamustard <at> posteo.net>,
 Julien Lepiller <julien <at> lepiller.eu>,
 Ludovic Courtès <ludo <at> gnu.org>, 69185 <at> debbugs.gnu.org
Subject: Re: bug#69185: [PATCH master] gnu: ocaml: Update to 5.1.1
Date: Sun, 07 Apr 2024 16:42:18 -0500
Hey everyone,

So I decided to attempt this today, but ran into issues with merlin.

Current version of merlin is built for 5.0, and will break if attempted
to be built on version 5.1.

I tried to build to bump up the version but ran into the error when
building ocaml-merlin-lib, which needs to be upgraded to at least
version 4.11-501.

However, when I tried to do so, I ran into the error.

```
Error: The functor was expected to be applicative at this position
```

And struggled with it for a bit but ultimately couldn't get it to work.

I'm adding the diff in case anyone wants to have another attempt.

I've made some more changes, basically I've replaced all instances of
ocaml5.0 with ocaml5.1.


Cheers
Marc

---
82ded88c7751c0ad210f12b7b5a617031311f96f gnu: ocaml: Update to 5.1.1
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 7fad276b4e..1b12b4121a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -191,10 +191,10 @@ (define-public camlboot
 This package produces a native @command{ocamlc} and a bytecode @command{ocamllex}.")
       (license license:expat))))
 
-(define-public ocaml-5.0
+(define-public ocaml-5.1
   (package
     (name "ocaml")
-    (version "5.0.0")
+    (version "5.1.0")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -203,7 +203,7 @@ (define-public ocaml-5.0
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "1p0p8wldrnbr61wfy3x4122017g4k5gjvfwlg3mvlqn8r2fxn2m5"))))
+                "1x3a6cyibmmyhqxq2y6vvj1bj3rngqkvppilchsmsn76p8nh8hcr"))))
     (build-system gnu-build-system)
     (native-search-paths
      (list (search-path-specification
@@ -906,8 +906,8 @@ (define-public opam-installer
 OPAM.")
     (properties
      ;; opam-installer is used as a tool and not as a library, we can use the
-     ;; OCaml 4.14 compiled opam until opam is compatible with OCaml 5.0.
-     `((ocaml5.0-variant . ,(delay opam-installer))))))
+     ;; OCaml 4.14 compiled opam until opam is compatible with OCaml 5.1.
+     `((ocaml5.1-variant . ,(delay opam-installer))))))
 
 (define ocaml-opam-repository
   (package
@@ -1102,8 +1102,8 @@ (define-public opam
     (inputs (list ocaml-opam-client))
     (properties
      ;; OPAM is used as a tool and not as a library, we can use the OCaml 4.14
-     ;; compiled opam until opam is compatible with OCaml 5.0.
-     `((ocaml5.0-variant . ,(delay opam))))))
+     ;; compiled opam until opam is compatible with OCaml 5.1.
+     `((ocaml5.1-variant . ,(delay opam))))))
 
 (define-public ocaml-opam-monorepo
   (package
@@ -1382,6 +1382,36 @@ (define-public ocaml-menhir
     ;; are QPL licensed.
     (license (list license:gpl2+ license:qpl))))
 
+(define-public ocaml5.1-menhir
+  (package
+    (name "ocaml-menhir")
+    (version "20231231")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://gitlab.inria.fr/fpottier/menhir.git")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "12a1zxbkipa2i0k7ay0frfzyibpdvh3hr0rcq18kgsp924wp9q5x"))))
+    (build-system dune-build-system)
+    (inputs
+     (list ocaml))
+    (arguments
+     `(#:tests? #f)) ; No check target
+    (properties `((ocaml5.1-variant . ,(delay (strip-ocaml5.1-variant ocaml5.1-menhir)))))
+    (home-page "https://gallium.inria.fr/~fpottier/menhir/")
+    (synopsis "Parser generator")
+    (description "Menhir is a parser generator.  It turns high-level grammar
+specifications, decorated with semantic actions expressed in the OCaml
+programming language into parsers, again expressed in OCaml.  It is based on
+Knuth’s LR(1) parser construction technique.")
+    ;; The file src/standard.mly and all files listed in src/mnehirLib.mlpack
+    ;; that have an *.ml or *.mli extension are GPL licensed. All other files
+    ;; are QPL licensed.
+    (license (list license:gpl2+ license:qpl))))
+
 (define-public ocaml-bigarray-compat
   (package
     (name "ocaml-bigarray-compat")
@@ -1615,12 +1645,12 @@ (define-public ocaml4.09-findlib
     (native-inputs
      (list m4 ocaml-4.09))))
 
-(define-public ocaml5.0-findlib
+(define-public ocaml5.1-findlib
   (package
     (inherit ocaml-findlib)
-    (name "ocaml5.0-findlib")
+    (name "ocaml5.1-findlib")
     (native-inputs
-     (list m4 ocaml-5.0))))
+     (list m4 ocaml-5.1))))
 
 (define-public ocaml-ounit2
   (package
@@ -1953,8 +1983,8 @@ (define-public dune-bootstrap
 (define-public ocaml4.09-dune-bootstrap
   (package-with-ocaml4.09 dune-bootstrap))
 
-(define-public ocaml5.0-dune-bootstrap
-  (package-with-ocaml5.0 dune-bootstrap))
+(define-public ocaml5.1-dune-bootstrap
+  (package-with-ocaml5.1 dune-bootstrap))
 
 (define-public dune-configurator
   (package
@@ -1977,7 +2007,7 @@ (define-public dune-configurator
     (propagated-inputs
      (list ocaml-csexp))
     (properties `((ocaml4.09-variant . ,(delay ocaml4.09-dune-configurator))
-                  (ocaml5.0-variant . ,(delay ocaml5.0-dune-configurator))))
+                  (ocaml5.1-variant . ,(delay ocaml5.1-dune-configurator))))
     (synopsis "Dune helper library for gathering system configuration")
     (description "Dune-configurator is a small library that helps writing
 OCaml scripts that test features available on the system, in order to generate
@@ -2002,16 +2032,16 @@ (define-public ocaml4.09-dune-configurator
     (propagated-inputs
      `(("ocaml-csexp" ,ocaml4.09-csexp)))))
 
-(define-public ocaml5.0-dune-configurator
+(define-public ocaml5.1-dune-configurator
   (package
     (inherit dune-configurator)
-    (name "ocaml5.0-dune-configurator")
+    (name "ocaml5.1-dune-configurator")
     (arguments
      `(,@(package-arguments dune-configurator)
-       #:dune ,ocaml5.0-dune-bootstrap
-       #:ocaml ,ocaml-5.0
-       #:findlib ,ocaml5.0-findlib))
-    (propagated-inputs (list ocaml5.0-csexp))))
+       #:dune ,ocaml5.1-dune-bootstrap
+       #:ocaml ,ocaml-5.1
+       #:findlib ,ocaml5.1-findlib))
+    (propagated-inputs (list ocaml5.1-csexp))))
 
 (define-public dune
   (package
@@ -2020,7 +2050,7 @@ (define-public dune
      (list dune-configurator))
     (properties `((ocaml4.07-variant . ,(delay ocaml4.07-dune))
                   (ocaml4.09-variant . ,(delay ocaml4.09-dune))
-                  (ocaml5.0-variant . ,(delay ocaml5.0-dune))))))
+                  (ocaml5.1-variant . ,(delay ocaml5.1-dune))))))
 
 (define-public ocaml4.09-dune
   (package
@@ -2042,11 +2072,11 @@ (define-public ocaml4.07-dune
                (base32
                 "0l4x0x2fz135pljv88zj8y6w1ninsqw0gn1mdxzprd6wbxbyn8wr"))))))
 
-(define-public ocaml5.0-dune
+(define-public ocaml5.1-dune
   (package
-    (inherit ocaml5.0-dune-bootstrap)
+    (inherit ocaml5.1-dune-bootstrap)
     (propagated-inputs
-     (list ocaml5.0-dune-configurator))))
+     (list ocaml5.1-dune-configurator))))
 
 (define-public ocaml-pp
   (package
@@ -2172,7 +2202,7 @@ (define-public ocaml-csexp
     (propagated-inputs
      (list ocaml-result))
     (properties `((ocaml4.09-variant . ,(delay ocaml4.09-csexp))
-                  (ocaml5.0-variant . ,(delay ocaml5.0-csexp))))
+                  (ocaml5.1-variant . ,(delay ocaml5.1-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
@@ -2201,17 +2231,17 @@ (define-public ocaml4.09-csexp
     (propagated-inputs
      `(("ocaml-result" ,ocaml4.09-result)))))
 
-(define-public ocaml5.0-csexp
+(define-public ocaml5.1-csexp
   (package
     (inherit ocaml-csexp)
-    (name "ocaml5.0-csexp")
+    (name "ocaml5.1-csexp")
     (arguments
-     `(#:ocaml ,ocaml-5.0
-       #:findlib ,ocaml5.0-findlib
+     `(#:ocaml ,ocaml-5.1
+       #:findlib ,ocaml5.1-findlib
        ,@(substitute-keyword-arguments (package-arguments ocaml-csexp)
-           ((#:dune _) ocaml5.0-dune-bootstrap))))
+           ((#:dune _) ocaml5.1-dune-bootstrap))))
     (propagated-inputs
-     `(("ocaml-result" ,ocaml5.0-result)))))
+     `(("ocaml-result" ,ocaml5.1-result)))))
 
 (define-public ocaml-migrate-parsetree
   (package
@@ -2332,7 +2362,7 @@ (define-public ocaml-result
     (arguments
      `(#:dune ,dune-bootstrap))
     (properties `((ocaml4.09-variant . ,(delay ocaml4.09-result))
-                  (ocaml5.0-variant . ,(delay ocaml5.0-result))))
+                  (ocaml5.1-variant . ,(delay ocaml5.1-result))))
     (home-page "https://github.com/janestreet/result")
     (synopsis "Compatibility Result module")
     (description "Uses the new result type defined in OCaml >= 4.03 while
@@ -2349,14 +2379,14 @@ (define-public ocaml4.09-result
        #:ocaml ,ocaml-4.09
        #:findlib ,ocaml4.09-findlib))))
 
-(define-public ocaml5.0-result
+(define-public ocaml5.1-result
   (package
     (inherit ocaml-result)
-    (name "ocaml5.0-result")
+    (name "ocaml5.1-result")
     (arguments
-     `(#:dune ,ocaml5.0-dune-bootstrap
-       #:ocaml ,ocaml-5.0
-       #:findlib ,ocaml5.0-findlib))))
+     `(#:dune ,ocaml5.1-dune-bootstrap
+       #:ocaml ,ocaml-5.1
+       #:findlib ,ocaml5.1-findlib))))
 
 (define-public ocaml-iso8601
   (package
@@ -3169,8 +3199,8 @@ (define ocaml-eio
 OCaml with fibers.")
     (license license:isc)))
 
-(define-public ocaml5.0-eio
-  (package-with-ocaml5.0 ocaml-eio))
+(define-public ocaml5.1-eio
+  (package-with-ocaml5.1 ocaml-eio))
 
 (define ocaml-eio-luv
   (package
@@ -3183,8 +3213,8 @@ (define ocaml-eio-luv
     (description "@code{Eio_luv} provides a cross-platform backend for
 @code{Ocaml Eio}'s APIs using luv (libuv)")))
 
-(define-public ocaml5.0-eio-luv
-  (package-with-ocaml5.0 ocaml-eio-luv))
+(define-public ocaml5.1-eio-luv
+  (package-with-ocaml5.1 ocaml-eio-luv))
 
 (define-public ocaml-uring
   (package
@@ -3236,8 +3266,8 @@ (define ocaml-eio-linux
 @code{Ocaml Eio} APIs, plus a low-level API that can be used directly
 (in non-portable code).")))
 
-(define-public ocaml5.0-eio-linux
-  (package-with-ocaml5.0 ocaml-eio-linux))
+(define-public ocaml5.1-eio-linux
+  (package-with-ocaml5.1 ocaml-eio-linux))
 
 (define ocaml-eio-main
   (package
@@ -3256,8 +3286,8 @@ (define ocaml-eio-main
     (description "@code{Eio_main} selects an appropriate backend (e.g.
 @samp{eio_linux} or @samp{eio_luv}), depending on your platform.")))
 
-(define-public ocaml5.0-eio-main
-  (package-with-ocaml5.0 ocaml-eio-main))
+(define-public ocaml5.1-eio-main
+  (package-with-ocaml5.1 ocaml-eio-main))
 
 (define-public ocaml-lwt
   (package
@@ -5707,7 +5737,7 @@ (define-public ocaml-ctypes
       ("integers" ,ocaml-integers)))
    (inputs
     (list libffi))
-   (properties `((ocaml5.0-variant . ,(delay ocaml5.0-ctypes))))
+   (properties `((ocaml5.1-variant . ,(delay ocaml5.1-ctypes))))
    (synopsis "Library for binding to C libraries using pure OCaml")
    (description "Ctypes is a library for binding to C libraries using pure
 OCaml.  The primary aim is to make writing C extensions as straightforward as
@@ -5718,12 +5748,12 @@ (define-public ocaml-ctypes
 without writing or generating any C!")
    (license license:expat)))
 
-(define-public ocaml5.0-ctypes
-  ;; Contains fix to support OCaml 5.0
+(define-public ocaml5.1-ctypes
+  ;; Contains fix to support OCaml 5.1
   ;; (https://github.com/ocamllabs/ocaml-ctypes/pull/709)
   (let ((commit "52ff621f47dbc1ee5a90c30af0ae0474549946b4")
         (revision "0"))
-    (package-with-ocaml5.0
+    (package-with-ocaml5.1
      (package
        (inherit ocaml-ctypes)
        (name "ocaml-ctypes")
@@ -6098,7 +6128,7 @@ (define-public ocaml-merlin-lib
     (arguments '(#:package "merlin-lib"
                  #:tests? #f))          ; no tests
     (propagated-inputs (list ocaml-csexp ocaml-menhir))
-    (properties `((ocaml5.0-variant . ,(delay ocaml5.0-merlin-lib))))
+    (properties `((ocaml5.1-variant . ,(delay ocaml5.1-merlin-lib))))
     (home-page "https://ocaml.github.io/merlin/")
     (synopsis "Merlin libraries")
     (description "These libraries provides access to low-level compiler
@@ -6110,7 +6140,7 @@ (define ocaml-merlin-lib-500
   (package
     (inherit ocaml-merlin-lib)
     (name "ocaml-merlin-lib")
-    (version "4.7.1-500")
+    (version "4.13.1-501")
     (source
      (origin
        (method git-fetch)
@@ -6120,11 +6150,11 @@ (define ocaml-merlin-lib-500
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "05a87i2dkzv800nwb6y7b2j45avg8gs3gzb5a98wrj1i5zjqwh01"))))
+         "05k07hfxxdcfzis7n2fsa2a2kd1f06dharkyyv8vixmrgzffn2c3"))))
     (properties '())))
 
-(define-public ocaml5.0-merlin-lib
-  (package-with-ocaml5.0 ocaml-merlin-lib-500))
+(define-public ocaml5.1-merlin-lib
+  (package-with-ocaml5.1 ocaml-merlin-lib-500))
 
 (define-public ocaml-dot-merlin-reader
   (package
@@ -6133,19 +6163,19 @@ (define-public ocaml-dot-merlin-reader
     (arguments '(#:package "dot-merlin-reader"
                  #:tests? #f))          ; no tests
     (propagated-inputs (list ocaml-merlin-lib))
-    (properties `((ocaml5.0-variant . ,(delay ocaml5.0-dot-merlin-reader))))
+    (properties `((ocaml5.1-variant . ,(delay ocaml5.1-dot-merlin-reader))))
     (synopsis "Reads config files for @code{ocaml-merlin}")
     (description "@code{ocaml-dot-merlin-reader} is an external reader for
 @code{ocaml-merlin} configurations.")))
 
-(define-public ocaml5.0-dot-merlin-reader
-  (package-with-ocaml5.0
+(define-public ocaml5.1-dot-merlin-reader
+  (package-with-ocaml5.1
    (package
      (inherit ocaml-merlin-lib-500)
      (name "ocaml-dot-merlin-reader")
      (arguments '(#:package "dot-merlin-reader"
                   #:tests? #f))         ; no tests
-     (propagated-inputs (list ocaml5.0-merlin-lib))
+     (propagated-inputs (list ocaml5.1-merlin-lib))
      (synopsis "Reads config files for @code{ocaml-merlin}")
      (description "@code{ocaml-dot-merlin-reader} is an external reader for
 @code{ocaml-merlin} configurations."))))
@@ -6163,7 +6193,7 @@ (define-public ocaml-merlin
              (when tests?
                (invoke "dune" "runtest" "-p" "merlin,dot-merlin-reader")))))))
     (propagated-inputs (list ocaml-merlin-lib ocaml-yojson))
-    (properties `((ocaml5.0-variant . ,(delay ocaml5.0-merlin))))
+    (properties `((ocaml5.1-variant . ,(delay ocaml5.1-merlin))))
     (native-inputs
      (list ocaml-dot-merlin-reader ; required for tests
            ocaml-ppxlib
@@ -6176,8 +6206,8 @@ (define-public ocaml-merlin
 Atom.")
     (license license:expat)))
 
-(define-public ocaml5.0-merlin
-  (package-with-ocaml5.0
+(define-public ocaml5.1-merlin
+  (package-with-ocaml5.1
    (package
      (inherit ocaml-merlin-lib-500)
      (name "ocaml-merlin")
@@ -6431,7 +6461,7 @@ (define-public ocaml-base
     (build-system dune-build-system)
     (propagated-inputs
      (list ocaml-sexplib0))
-    (properties `((ocaml5.0-variant . ,(delay ocaml5.0-base))))
+    (properties `((ocaml5.1-variant . ,(delay ocaml5.1-base))))
     (synopsis
      "Full standard library replacement for OCaml")
     (description
@@ -6446,12 +6476,12 @@ (define-public ocaml-base
 @url{https://github.com/janestreet/stdio, ocaml-stdio}.")
     (license license:expat)))
 
-(define-public ocaml5.0-base
+(define-public ocaml5.1-base
   ;; This version contains fixes for OCaml 5.0
   ;; (see https://github.com/ocaml/opam-repository/pull/21851)
   (let ((commit "423dbad212f55506767d758b1ceb2d6e0ee8e7f5")
         (revision "0"))
-   (package-with-ocaml5.0
+   (package-with-ocaml5.1
     (package
       (inherit ocaml-base)
       (name "ocaml-base")
@@ -6462,7 +6492,7 @@ (define-public ocaml5.0-base
          (uri (git-reference
                (url "https://github.com/kit-ty-kate/base")
                (commit commit)))
-         (file-name (git-file-name "ocaml5.0-base" version))
+         (file-name (git-file-name "ocaml5.1-base" version))
          (sha256
           (base32
            "15vsiv3q53l1bzrvqgspf3lp2104s9dzw62z3nl75f53jvjvsyf6"))))
@@ -7369,7 +7399,7 @@ (define-public ocaml-ppx-expect
            ocaml-migrate-parsetree
            ocaml-re))
     (properties `((upstream-name . "ppx_expect")
-                  (ocaml5.0-variant . ,(delay ocaml5.0-ppx-expect))))
+                  (ocaml5.1-variant . ,(delay ocaml5.1-ppx-expect))))
     (home-page "https://github.com/janestreet/ppx_expect")
     (synopsis "Cram like framework for OCaml")
     (description "Expect-test is a framework for writing tests in OCaml, similar
@@ -7379,12 +7409,12 @@ (define-public ocaml-ppx-expect
 to denote the expected output.")
     (license license:asl2.0)))
 
-(define-public ocaml5.0-ppx-expect
+(define-public ocaml5.1-ppx-expect
   ;; Contains fixes for OCaml 5.0
   ;; (https://github.com/janestreet/ppx_expect/pull/39/).
   (let ((commit "83edfc1ee779e8dcdd975e26715c2e688326befa")
         (revision "0"))
-    (package-with-ocaml5.0
+    (package-with-ocaml5.1
      (package
        (inherit ocaml-ppx-expect)
        (name "ocaml-ppx-expect")
@@ -9235,15 +9265,15 @@ (define-public ocaml-crowbar
            ocaml-uunf
            ocaml-uutf
            ocaml-pprint))
-    (properties `((ocaml5.0-variant . ,(delay ocaml5.0-crowbar))))
+    (properties `((ocaml5.1-variant . ,(delay ocaml5.1-crowbar))))
     (synopsis "Ocaml library for tests, let a fuzzer find failing cases")
     (description "Crowbar is a library for testing code, combining
 QuickCheck-style property-based testing and the magical bug-finding powers of
 @uref{http://lcamtuf.coredump.cx/afl/, afl-fuzz}.")
     (license license:expat)))
 
-(define-public ocaml5.0-crowbar
-  (package-with-ocaml5.0
+(define-public ocaml5.1-crowbar
+  (package-with-ocaml5.1
    (package
      (inherit ocaml-crowbar)
      ;; Tests require ocaml-calendar which does not work with OCaml 5.0
diff --git a/guix/build-system/ocaml.scm b/guix/build-system/ocaml.scm
index 582d00b4cd..607e6dca60 100644
--- a/guix/build-system/ocaml.scm
+++ b/guix/build-system/ocaml.scm
@@ -31,8 +31,8 @@ (define-module (guix build-system ocaml)
             strip-ocaml4.07-variant
             package-with-ocaml4.09
             strip-ocaml4.09-variant
-            package-with-ocaml5.0
-            strip-ocaml5.0-variant
+            package-with-ocaml5.1
+            strip-ocaml5.1-variant
             default-findlib
             default-ocaml
             lower
@@ -112,17 +112,17 @@ (define (default-ocaml4.09-dune)
   (let ((module (resolve-interface '(gnu packages ocaml))))
     (module-ref module 'ocaml4.09-dune)))
 
-(define (default-ocaml5.0)
+(define (default-ocaml5.1)
   (let ((ocaml (resolve-interface '(gnu packages ocaml))))
-    (module-ref ocaml 'ocaml-5.0)))
+    (module-ref ocaml 'ocaml-5.1)))
 
-(define (default-ocaml5.0-findlib)
+(define (default-ocaml5.1-findlib)
   (let ((module (resolve-interface '(gnu packages ocaml))))
-    (module-ref module 'ocaml5.0-findlib)))
+    (module-ref module 'ocaml5.1-findlib)))
 
-(define (default-ocaml5.0-dune)
+(define (default-ocaml5.1-dune)
   (let ((module (resolve-interface '(gnu packages ocaml))))
-    (module-ref module 'ocaml5.0-dune)))
+    (module-ref module 'ocaml5.1-dune)))
 
 (define* (package-with-explicit-ocaml ocaml findlib dune old-prefix new-prefix
                                        #:key variant-property)
@@ -212,18 +212,18 @@ (define (strip-ocaml4.09-variant p)
     (inherit p)
     (properties (alist-delete 'ocaml4.09-variant (package-properties p)))))
 
-(define package-with-ocaml5.0
-  (package-with-explicit-ocaml (delay (default-ocaml5.0))
-                               (delay (default-ocaml5.0-findlib))
-                               (delay (default-ocaml5.0-dune))
-                               "ocaml-" "ocaml5.0-"
-                               #:variant-property 'ocaml5.0-variant))
+(define package-with-ocaml5.1
+  (package-with-explicit-ocaml (delay (default-ocaml5.1))
+                               (delay (default-ocaml5.1-findlib))
+                               (delay (default-ocaml5.1-dune))
+                               "ocaml-" "ocaml5.1-"
+                               #:variant-property 'ocaml5.1-variant))
 
-(define (strip-ocaml5.0-variant p)
-  "Remove the 'ocaml5.0-variant' property from P."
+(define (strip-ocaml5.1-variant p)
+  "Remove the 'ocaml5.1-variant' property from P."
   (package
     (inherit p)
-    (properties (alist-delete 'ocaml5.0-variant (package-properties p)))))
+    (properties (alist-delete 'ocaml5.1-variant (package-properties p)))))
 
 (define* (lower name
                 #:key source inputs native-inputs outputs system target




Marc Coquand <marc <at> mccd.space> writes:

> Hey!
>
> I'll have a look at this when I have time, hopefully tomorrow or end of
> the week.  :)
>
> Sincerely,
> Marc
>
> Ludovic Courtès <ludo <at> gnu.org> writes:
>
>> Hello,
>>
>> pukkamustard <pukkamustard <at> posteo.net> skribis:
>>
>>> I would suggest adding a package-with-ocaml5.1 transformation to this
>>> patch series (as dependencies probably ocaml5.1-findlib and
>>> ocaml5.1-dune). This would make the new compiler more directly usable
>>> and would help in testing the new compiler for OCaml packages already in
>>> Guix.
>>
>> Marc, could you look into adding this?
>>
>> (I’m not on the OCaml team but I Cc’d Julien who’s one of them.  If
>> Julien is unavailable and pukkamustard gives a green light, I can apply
>> the revised patch on their behalf.)
>>
>> Ludo’.





This bug report was last modified 1 year and 75 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.