[WIP 0/1] Add ocaml-4.09.

  • Done
  • quality assurance status badge
Details
2 participants
  • Brett Gilio
  • Julien Lepiller
Owner
unassigned
Submitted by
Brett Gilio
Severity
normal

Debbugs page

Brett Gilio wrote 5 years ago
(address . guix-patches@gnu.org)
87r20i4q68.fsf@gnu.org
From 1f3f55c2482fb33912a38829f0c2b981d835d80f Mon Sep 17 00:00:00 2001
From: Brett Gilio <brettg@gnu.org>
Date: Wed, 1 Jan 2020 19:09:16 -0600
Subject: [WIP 0/1] Add ocaml-4.09.
To: guix-patches@gnu.org

This patch series is a WIP for adding OCaml 4.09.0.
I want to see if we can make the failing tests work, and ensure
that all relevant changes from the inherited OCaml version are fine.
For example, I removed the configuration replacement, and the shell
patching.

Brett Gilio (1):
gnu: Add ocaml-4.09.

gnu/packages/ocaml.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)

--
2.24.1
Brett Gilio wrote 5 years ago
[WIP 1/1] gnu: Add ocaml-4.09.
(address . 38861@debbugs.gnu.org)
87mub64q2x.fsf@gnu.org
From 1f3f55c2482fb33912a38829f0c2b981d835d80f Mon Sep 17 00:00:00 2001
From: Brett Gilio <brettg@gnu.org>
Date: Wed, 1 Jan 2020 19:06:13 -0600
Subject: [WIP 1/1] gnu: Add ocaml-4.09.
To: guix-patches@gnu.org

* gnu/packages/ocaml.scm (ocaml-4.09): New variable inherits from ocaml-4.07
with changes to configuration and checks.
---
gnu/packages/ocaml.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)

Toggle diff (57 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 2988810fc7..0ee8fdd508 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -13,6 +13,7 @@
;;; Copyright © 2018, 2019 Gabriel Hondet <gabrielhondet@gmail.com>
;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net>
;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -212,6 +213,42 @@ 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.07)
+ (name "ocaml")
+ (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"))))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'delete-failing-tests
+ (lambda _
+ (with-directory-excursion "testsuite"
+ (for-each delete-file-recursively
+ '(;; This test group does not terminate.
+ "tests/tool-debugger"
+ ;; These test groups fail.
+ "tests/lib-unix/common"
+ "tests/lib-scanf-2"
+ "tests/lib-threads")))
+ #t))
+ (replace 'build
+ (lambda _
+ (invoke "make" "-j" (number->string (parallel-job-count))
+ "world.opt")))
+ (replace 'check
+ (lambda _
+ (with-directory-excursion "testsuite"
+ (invoke "make" "all")))))))))
+
(define-public ocaml ocaml-4.07)
(define-public ocamlbuild
--
2.24.1
Brett Gilio wrote 5 years ago
(address . 38861@debbugs.gnu.org)
87o8veqwo6.fsf@gnu.org
Brett Gilio <brettg@gnu.org> writes:

Toggle quote (68 lines)
>>From 1f3f55c2482fb33912a38829f0c2b981d835d80f Mon Sep 17 00:00:00 2001
> From: Brett Gilio <brettg@gnu.org>
> Date: Wed, 1 Jan 2020 19:06:13 -0600
> Subject: [WIP 1/1] gnu: Add ocaml-4.09.
> To: guix-patches@gnu.org
>
> * gnu/packages/ocaml.scm (ocaml-4.09): New variable inherits from ocaml-4.07
> with changes to configuration and checks.
> ---
> gnu/packages/ocaml.scm | 37 +++++++++++++++++++++++++++++++++++++
> 1 file changed, 37 insertions(+)
>
> diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
> index 2988810fc7..0ee8fdd508 100644
> --- a/gnu/packages/ocaml.scm
> +++ b/gnu/packages/ocaml.scm
> @@ -13,6 +13,7 @@
> ;;; Copyright © 2018, 2019 Gabriel Hondet <gabrielhondet@gmail.com>
> ;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net>
> ;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
> +;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -212,6 +213,42 @@ 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.07)
> + (name "ocaml")
> + (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"))))
> + (arguments
> + `(#:phases
> + (modify-phases %standard-phases
> + (add-after 'unpack 'delete-failing-tests
> + (lambda _
> + (with-directory-excursion "testsuite"
> + (for-each delete-file-recursively
> + '(;; This test group does not terminate.
> + "tests/tool-debugger"
> + ;; These test groups fail.
> + "tests/lib-unix/common"
> + "tests/lib-scanf-2"
> + "tests/lib-threads")))
> + #t))
> + (replace 'build
> + (lambda _
> + (invoke "make" "-j" (number->string (parallel-job-count))
> + "world.opt")))
> + (replace 'check
> + (lambda _
> + (with-directory-excursion "testsuite"
> + (invoke "make" "all")))))))))
> +
> (define-public ocaml ocaml-4.07)
>
> (define-public ocamlbuild

Hello all who are interested. I'd really like to get OCaml up to 4.09
(and all of the OCaml-dependent packages in better shape). I am unsure
of the approach to take. Should I offer two versions of OCaml? If so,
should I subsequently offer two versions of each ocaml-* package built
against each respective toolchain or what is our protocol here?

--
Brett M. Gilio
GNU Guix, Contributor | GNU Project, Webmaster
[DFC0 C7F7 9EE6 0CA7 AE55 5E19 6722 43C4 A03F 0EEE]
<brettg@gnu.org> <brettg@posteo.net>
Julien Lepiller wrote 5 years ago
6D6FCD42-17DE-4E97-A5CA-F959DDE199D3@lepiller.eu
Le 8 janvier 2020 01:39:21 GMT-05:00, Brett Gilio <brettg@gnu.org> a écrit :
Toggle quote (82 lines)
>Brett Gilio <brettg@gnu.org> writes:
>
>>>From 1f3f55c2482fb33912a38829f0c2b981d835d80f Mon Sep 17 00:00:00
>2001
>> From: Brett Gilio <brettg@gnu.org>
>> Date: Wed, 1 Jan 2020 19:06:13 -0600
>> Subject: [WIP 1/1] gnu: Add ocaml-4.09.
>> To: guix-patches@gnu.org
>>
>> * gnu/packages/ocaml.scm (ocaml-4.09): New variable inherits from
>ocaml-4.07
>> with changes to configuration and checks.
>> ---
>> gnu/packages/ocaml.scm | 37 +++++++++++++++++++++++++++++++++++++
>> 1 file changed, 37 insertions(+)
>>
>> diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
>> index 2988810fc7..0ee8fdd508 100644
>> --- a/gnu/packages/ocaml.scm
>> +++ b/gnu/packages/ocaml.scm
>> @@ -13,6 +13,7 @@
>> ;;; Copyright © 2018, 2019 Gabriel Hondet <gabrielhondet@gmail.com>
>> ;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net>
>> ;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
>> +;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
>> ;;;
>> ;;; This file is part of GNU Guix.
>> ;;;
>> @@ -212,6 +213,42 @@ 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.07)
>> + (name "ocaml")
>> + (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"))))
>> + (arguments
>> + `(#:phases
>> + (modify-phases %standard-phases
>> + (add-after 'unpack 'delete-failing-tests
>> + (lambda _
>> + (with-directory-excursion "testsuite"
>> + (for-each delete-file-recursively
>> + '(;; This test group does not
>terminate.
>> + "tests/tool-debugger"
>> + ;; These test groups fail.
>> + "tests/lib-unix/common"
>> + "tests/lib-scanf-2"
>> + "tests/lib-threads")))
>> + #t))
>> + (replace 'build
>> + (lambda _
>> + (invoke "make" "-j" (number->string
>(parallel-job-count))
>> + "world.opt")))
>> + (replace 'check
>> + (lambda _
>> + (with-directory-excursion "testsuite"
>> + (invoke "make" "all")))))))))
>> +
>> (define-public ocaml ocaml-4.07)
>>
>> (define-public ocamlbuild
>
>Hello all who are interested. I'd really like to get OCaml up to 4.09
>(and all of the OCaml-dependent packages in better shape). I am unsure
>of the approach to take. Should I offer two versions of OCaml? If so,
>should I subsequently offer two versions of each ocaml-* package built
>against each respective toolchain or what is our protocol here?

I tried to do that not so long ago, but failed because of two packages: bap and another one I can't remember. The whole janestreet stuff (core and ppx-*) needs to be re-imported: many dependencies changed.

I think we can have two versions of ocaml if some packages don't support the latest. In that case, I would only duplicate packages that are dependencies of these packages. In general, you can use a procedure to recursively modify ocaml packages so they use the older version. See package-with-ocaml4.02 that existed at some point.
Brett Gilio wrote 5 years ago
(name . Julien Lepiller)(address . julien@lepiller.eu)(address . 38861@debbugs.gnu.org)
87wo9yn4dj.fsf@gnu.org
Julien Lepiller <julien@lepiller.eu> writes:

Toggle quote (13 lines)
>
> I tried to do that not so long ago, but failed because of two
> packages: bap and another one I can't remember. The whole janestreet
> stuff (core and ppx-*) needs to be re-imported: many dependencies
> changed.
>
> I think we can have two versions of ocaml if some packages don't
> support the latest. In that case, I would only duplicate packages that
> are dependencies of these packages. In general, you can use a
> procedure to recursively modify ocaml packages so they use the older
> version. See package-with-ocaml4.02 that existed at some point.
>

Thanks for your help Julien. I am trying some things on my channel. Will
report back here in a few days.

--
Brett M. Gilio
GNU Guix, Contributor | GNU Project, Webmaster
[DFC0 C7F7 9EE6 0CA7 AE55 5E19 6722 43C4 A03F 0EEE]
<brettg@gnu.org> <brettg@posteo.net>
Brett Gilio wrote 5 years ago
(name . Julien Lepiller)(address . julien@lepiller.eu)(address . 38861-done@debbugs.gnu.org)
87muarowjm.fsf@gnu.org
Brett Gilio <brettg@gnu.org> writes:

Toggle quote (18 lines)
> Julien Lepiller <julien@lepiller.eu> writes:
>
>>
>> I tried to do that not so long ago, but failed because of two
>> packages: bap and another one I can't remember. The whole janestreet
>> stuff (core and ppx-*) needs to be re-imported: many dependencies
>> changed.
>>
>> I think we can have two versions of ocaml if some packages don't
>> support the latest. In that case, I would only duplicate packages that
>> are dependencies of these packages. In general, you can use a
>> procedure to recursively modify ocaml packages so they use the older
>> version. See package-with-ocaml4.02 that existed at some point.
>>
>
> Thanks for your help Julien. I am trying some things on my channel. Will
> report back here in a few days.

Development is occuring now on branch 'wip-ocaml4.09'. Closing.

--
Brett M. Gilio
GNU Guix, Contributor | GNU Project, Webmaster
[DFC0 C7F7 9EE6 0CA7 AE55 5E19 6722 43C4 A03F 0EEE]
<brettg@gnu.org> <brettg@posteo.net>
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 38861@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 38861
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help