[PATCH] gnu: gerbil: Upgrade to 0.17.0.

  • Done
  • quality assurance status badge
Details
3 participants
  • J. Sims
  • Ludovic Courtès
  • Bruno Victal
Owner
unassigned
Submitted by
J. Sims
Severity
normal
J
J
J. Sims wrote on 20 Mar 2023 00:06
(name . guix-patches@gnu.org)(address . guix-patches@gnu.org)
pNKW-ofctVMCSivZsLfj0vL5GcFzDJc-tOXgxg85Ug4eT7J5qMfVSezsuu_3BKEHl8Kcg8UMCpdq4gROMB7UJbPq866f_wYJ1bE0b0FrX54=@protonmail.com
Hello,

Attached is a patch to upgrade Gerbil to the latest version. In addition, it fixes a few issues:

* switch build code to use g-expressions
* use the `#:tests?' argument of `arguments' instead of deleting the `check' phase
* run `guix style'
* fix issue with missing version file during build

Honestly, I'm not sure I fixed the latter issue in the most idiomatic way. I simply printed the appropriate s-expression to the appropriate file using Guile's `format'. If anyone has advice for a cleaner/more robust way to handle that, please let me know.

Note that I initially tried to fix the version file issue by ignoring the build instructions in the Gerbil guide and instead using the autotools build infrastructure whose artifacts can be seen in the top-level directory of the Gerbil repository. This ran into a different issue, and in the process of diagnosing it, I realized that the build infrastructure in question was written specifically for the previous version. There being no good reason to solve that problem over this one, and realizing that proper versioning would complicate the use of that system even more than solving the missing version file issue, I elected to pursue the route I did.

This is far too much information for a git commit message, but I did feel it worth mentioning somewhere.

Thanks,
Juli
B
B
Bruno Victal wrote on 21 Mar 2023 14:57
(name . J. Sims)(address . jtsims@protonmail.com)
0121a7d5-ed7a-9272-1c67-4182d979dd0d@makinata.eu
Hi Juli,

On 2023-03-19 23:06, J. Sims via Guix-patches via wrote:
Toggle quote (15 lines)
> Hello,
>
> Attached is a patch to upgrade Gerbil to the latest version. In addition, it fixes a few issues:
>
> * switch build code to use g-expressions
> * use the `#:tests?' argument of `arguments' instead of deleting the `check' phase
> * run `guix style'
> * fix issue with missing version file during build
>
> Honestly, I'm not sure I fixed the latter issue in the most idiomatic way. I simply printed the appropriate s-expression to the appropriate file using Guile's `format'. If anyone has advice for a cleaner/more robust way to handle that, please let me know.
>
> Note that I initially tried to fix the version file issue by ignoring the build instructions in the Gerbil guide and instead using the autotools build infrastructure whose artifacts can be seen in the top-level directory of the Gerbil repository. This ran into a different issue, and in the process of diagnosing it, I realized that the build infrastructure in question was written specifically for the previous version. There being no good reason to solve that problem over this one, and realizing that proper versioning would complicate the use of that system even more than solving the missing version file issue, I elected to pursue the route I did.
>
> This is far too much information for a git commit message, but I did feel it worth mentioning somewhere.

You should split these changes into separate commits.

Take a look at https://issues.guix.gnu.org/61845 or search the git history for “G-Expression”
for some inspiration in how to split them.


Cheers,
Bruno
J
J
J. Sims wrote on 30 Mar 2023 04:12
(name . 62282@debbugs.gnu.org)(address . 62282@debbugs.gnu.org)
LSuRbFEjWmMm1qyxkuaXGo3gQfE0OmQpT61n_KZK0XgalSlLTjksQg6L23adZp6YQxeLmhWu4tHUYG3998qeF_w0d6u-BSrXjFPBtOOTniY=@protonmail.com
Hello,

Toggle quote (4 lines)
> You should split these changes into separate commits.
>
> Take a look at https://issues.guix.gnu.org/61845 or search the git history for “G-Expression”

I have done so and the new patches are attached here.

The first two patches have the same effect as the initial patch. The third patch enables a set of features that were not enabled before, but which it would be useful to make available to Guix users.

Thanks,
Juli
From 494e5b344b550bbb09d726c7e7c139ee5d1c801d Mon Sep 17 00:00:00 2001
From: Juliana Sims <jtsims@protonmail.com>
Date: Tue, 28 Mar 2023 22:45:26 -0400
Subject: [PATCH 1/3] gnu: gerbil: Update to 0.17.0.

* gnu/package/scheme.scm (gerbil): Update to 0.17.0.
---
gnu/packages/scheme.scm | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)

Toggle diff (56 lines)
diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm
index e6a9ef1db0..e6f58aa403 100644
--- a/gnu/packages/scheme.scm
+++ b/gnu/packages/scheme.scm
@@ -21,6 +21,7 @@
;;; Copyright © 2022 jgart <jgart@dismail.de>
;;; Copyright © 2022 Robby Zambito <contact@robbyzambito.me>
;;; Copyright © 2023 Andrew Whatson <whatson@tailcall.au>
+;;; Copyright © 2023 Juliana Sims <jtsims@protonmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1113,7 +1114,7 @@ (define-public cl-airship-scheme
(define-public gerbil
(package
(name "gerbil")
- (version "0.16")
+ (version "0.17.0")
(source
(origin
(method git-fetch)
@@ -1122,7 +1123,7 @@ (define-public gerbil
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "0vng0kxpnwsg8jbjdpyn4sdww36jz7zfpfbzayg9sdpz6bjxjy0f"))))
+ (base32 "0c0nspm659ybgmqlppdv7sxzll4hwkvcp9qmcsip6d0kz0p8r9c3"))))
(arguments
`(#:phases
(modify-phases %standard-phases
@@ -1172,6 +1173,14 @@ (define-public gerbil
"./tutorial/proxy/build-static.ss"
"./tutorial/proxy/build.ss")))
#t))
+ (add-after 'configure 'create-gx-version.scm
+ (lambda _
+ (with-output-to-file (string-append
+ (getcwd)
+ "/gerbil/runtime/gx-version.scm")
+ (lambda _
+ (write `(define (gerbil-version-string)
+ ,(string-append "v" ,(version-major+minor version))))))))
(replace
'build
(lambda*
@@ -1195,7 +1204,7 @@ (define-public gerbil
(copy-recursively "../bin" bin)
(copy-recursively "../lib" lib)))))))
(native-inputs
- (list coreutils util-linux))
+ (list coreutils gambit-c util-linux))
(propagated-inputs
(list gambit-c zlib openssl sqlite))
(build-system gnu-build-system)
--
2.39.2
From 569fabf7029200cbb3166af83b8fc89a6378468d Mon Sep 17 00:00:00 2001
From: Juliana Sims <jtsims@protonmail.com>
Date: Tue, 28 Mar 2023 23:56:07 -0400
Subject: [PATCH 3/3] gnu: gerbil: Enable all features.

* gnu/packages/scheme.scm (gerbil): Enable all features.
---
gnu/packages/scheme.scm | 25 ++++++++++++++++++++++---
1 file changed, 22 insertions(+), 3 deletions(-)

Toggle diff (56 lines)
diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm
index 8a510d840b..19ed5d0928 100644
--- a/gnu/packages/scheme.scm
+++ b/gnu/packages/scheme.scm
@@ -80,10 +80,12 @@ (define-module (gnu packages scheme)
#:use-module (gnu packages netpbm)
#:use-module (gnu packages pcre)
#:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages serialization)
#:use-module (gnu packages sqlite)
#:use-module (gnu packages tex)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages tls)
+ #:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
#:use-module (srfi srfi-1)
#:use-module (ice-9 match))
@@ -1140,7 +1142,14 @@ (define-public gerbil
"--prefix"
#$output
"--with-gambit"
- #$gambit-c)))
+ #$gambit-c
+ "--enable-leveldb"
+ "--enable-libxml"
+ "--enable-libyaml"
+ "--enable-lmdb"
+ "--enable-mysql"
+ "--enable-sqlite"
+ "--enable-zlib")))
(add-before 'patch-generated-file-shebangs 'fix-gxi-shebangs
(lambda _
;; Some .ss files refer to gxi using /usr/bin/env gxi
@@ -1202,8 +1211,18 @@ (define-public gerbil
(copy-recursively "../bin" bin)
(copy-recursively "../lib" lib)))))
#:tests? #f))
- (native-inputs (list coreutils gambit-c util-linux))
- (propagated-inputs (list gambit-c openssl sqlite zlib))
+ (native-inputs (list coreutils
+ gambit-c
+ util-linux))
+ (propagated-inputs (list gambit-c
+ leveldb
+ libxml2
+ libyaml
+ lmdb
+ mysql
+ openssl
+ sqlite
+ zlib))
(build-system gnu-build-system)
(synopsis "Meta-dialect of Scheme with post-modern features")
(description
--
2.39.2
L
L
Ludovic Courtès wrote on 9 Apr 2023 00:01
Re: bug#62282: [PATCH] gnu: gerbil: Upgrade to 0.17.0.
(name . J. Sims)(address . jtsims@protonmail.com)(name . 62282@debbugs.gnu.org)(address . 62282-done@debbugs.gnu.org)
87mt3i9got.fsf_-_@gnu.org
Hello,

Thanks for taking the time to split the patch. I’ve applied #1 and #2.

"J. Sims" <jtsims@protonmail.com> skribis:

Toggle quote (7 lines)
> From 569fabf7029200cbb3166af83b8fc89a6378468d Mon Sep 17 00:00:00 2001
> From: Juliana Sims <jtsims@protonmail.com>
> Date: Tue, 28 Mar 2023 23:56:07 -0400
> Subject: [PATCH 3/3] gnu: gerbil: Enable all features.
>
> * gnu/packages/scheme.scm (gerbil): Enable all features.

[...]

Toggle quote (29 lines)
> + "--enable-leveldb"
> + "--enable-libxml"
> + "--enable-libyaml"
> + "--enable-lmdb"
> + "--enable-mysql"
> + "--enable-sqlite"
> + "--enable-zlib")))
> (add-before 'patch-generated-file-shebangs 'fix-gxi-shebangs
> (lambda _
> ;; Some .ss files refer to gxi using /usr/bin/env gxi
> @@ -1202,8 +1211,18 @@ (define-public gerbil
> (copy-recursively "../bin" bin)
> (copy-recursively "../lib" lib)))))
> #:tests? #f))
> - (native-inputs (list coreutils gambit-c util-linux))
> - (propagated-inputs (list gambit-c openssl sqlite zlib))
> + (native-inputs (list coreutils
> + gambit-c
> + util-linux))
> + (propagated-inputs (list gambit-c
> + leveldb
> + libxml2
> + libyaml
> + lmdb
> + mysql
> + openssl
> + sqlite
> + zlib))

I have two questions:

1. What’s the impact on ‘guix size gerbil’? Overall we should find a
balance between feature usefulness and size.

2. Do all these really need to be propagated? Shouldn’t they be
regular inputs? If propagation is required, please add a comment
explaining why.

I propose to close this issue since the initial goal has been met, but
please open a new one to follow up on this.

Thanks!

Ludo’.
Closed
?