diff mbox series

[bug#70132,01/11] channels: Use SRFI-71 instead of SRFI-11.

Message ID 6f4f3bb9ebafe98416d378e9438c9453fae613d2.1712002698.git.ludo@gnu.org
State New
Headers show
Series Improve startup time and memory footprint for short-lived commands | expand

Commit Message

Ludovic Courtès April 1, 2024, 8:25 p.m. UTC
* guix/channels.scm (latest-channel-instance): Use SRFI-71.

Change-Id: I73531c98b3034e228006ed91518cc7bfedc784fd
---
 guix/channels.scm | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

Comments

Simon Tournier April 15, 2024, 10:41 p.m. UTC | #1
Hi Ludo,

Sorry for being late and out of my curiosity; improving my Guile-fu. ;-)

On lun., 01 avril 2024 at 22:25, Ludovic Courtès <ludo@gnu.org> wrote:

> -  #:use-module (srfi srfi-11)
[...]
> +  #:use-module (srfi srfi-71)

> -  (let-values (((channel)
> -                (ensure-default-introduction channel))
> -               ((checkout commit relation)
> -                (update-cached-checkout (channel-url channel)
> -                                        #:ref (channel-reference channel)
> -                                        #:starting-commit starting-commit)))
> +  (let ((channel (ensure-default-introduction channel))
> +        (checkout commit relation
> +                  (update-cached-checkout (channel-url channel)
> +                                          #:ref (channel-reference channel)
> +                                          #:starting-commit starting-commit)))

Is it only aesthetic?  Or does it change some performance?

Cheers,
simon
diff mbox series

Patch

diff --git a/guix/channels.scm b/guix/channels.scm
index 66f3122f79..10f0e3800f 100644
--- a/guix/channels.scm
+++ b/guix/channels.scm
@@ -43,10 +43,10 @@  (define-module (guix channels)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-2)
   #:use-module (srfi srfi-9)
-  #:use-module (srfi srfi-11)
   #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-34)
   #:use-module (srfi srfi-35)
+  #:use-module (srfi srfi-71)
   #:autoload   (guix describe) (current-channels) ;XXX: circular dep
   #:autoload   (guix self) (whole-package make-config.scm)
   #:autoload   (guix inferior) (gexp->derivation-in-inferior) ;FIXME: circular dep
@@ -411,12 +411,11 @@  (define* (latest-channel-instance store channel
     (and (string=? (basename file) ".git")
          (eq? 'directory (stat:type stat))))
 
-  (let-values (((channel)
-                (ensure-default-introduction channel))
-               ((checkout commit relation)
-                (update-cached-checkout (channel-url channel)
-                                        #:ref (channel-reference channel)
-                                        #:starting-commit starting-commit)))
+  (let ((channel (ensure-default-introduction channel))
+        (checkout commit relation
+                  (update-cached-checkout (channel-url channel)
+                                          #:ref (channel-reference channel)
+                                          #:starting-commit starting-commit)))
     (when relation
       (validate-pull channel starting-commit commit relation))