GNU bug report logs - #29296
[PATCH 0/2] gexp: Add 'let-system'

Previous Next

Package: guix-patches;

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

Date: Tue, 14 Nov 2017 16:20:02 UTC

Severity: normal

Tags: patch

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ludovic Courtès <ludo <at> gnu.org>
Subject: bug#29296: closed (Re: bug#41120: uvesafb service is unsupported
 on aarch64)
Date: Fri, 15 May 2020 22:44:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#29296: [PATCH 0/2] gexp: Add 'let-system'

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 29296 <at> debbugs.gnu.org.

-- 
29296: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=29296
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: 29296-done <at> debbugs.gnu.org, janneke <at> gnu.org,
 "pelzflorian \(Florian Pelz\)" <pelzflorian <at> pelzflorian.de>,
 41120 <at> debbugs.gnu.org
Subject: Re: bug#41120: uvesafb service is unsupported on aarch64
Date: Sat, 16 May 2020 00:43:34 +0200
Hi Mathieu,

Mathieu Othacehe <othacehe <at> gnu.org> skribis:

> Here's a rebased version of Ludo's patch. I'm not sure about the merge
> resolution in "lower-object", but otherwise it works fine!

I took another look, and you’re right, it does the job.  There were a
couple of issues: returning a self-quoting value as in

  (let-system s s)

wouldn’t work, and also caching wasn’t quite right (could be seen by
comparing GUIX_PROFILING="add-data-to-store-cache object-cache" before
and after).

Anyway, it took me much more time than I thought, but it’s here now:

  502f609d05 vm: Use 'let-system'.
  300a54bb98 utils: 'target-arm32?' & co. take an optional parameter.
  644cb40cd8 gexp: Add 'let-system'.
  d03001a31a gexp: Compilers can now return lowerable objects.

Let me know how it goes!

Ludo’.

[Message part 3 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: guix-patches <at> gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>,
 Mathieu Othacehe <m.othacehe <at> gmail.com>
Subject: [PATCH 0/2] gexp: Add 'let-system'
Date: Tue, 14 Nov 2017 17:18:41 +0100
Hello!

This patch adds the ‘let-system’ form to (guix gexp), as discussed with
Mathieu at <https://bugs.gnu.org/29281>.  It allows you to insert
system-dependent code inside a gexp, as in this example:

      #~(system*
         #+(let-system system
             (cond ((string-prefix? "armhf-" system)
                    (file-append qemu "/bin/qemu-system-arm"))
                   ((string-prefix? "x86_64-" system)
                    (file-append qemu "/bin/qemu-system-x86_64"))
                   (else
                    (error "dunno!"))))
         "-net" "user" #$image)

(Using (%current-system) and (%current-target-system) does *not* achieve
this, in case you’re wondering, because at the time the gexp is defined
they carry their default value.)

Feedback welcome!

Ludo’.

Ludovic Courtès (2):
  gexp: Compilers can now return lowerable objects.
  gexp: Add 'let-system'.

 doc/guix.texi  |  26 ++++++++++++++
 guix/gexp.scm  | 105 ++++++++++++++++++++++++++++++++++++++++++++++++---------
 tests/gexp.scm |  50 +++++++++++++++++++++++++++
 3 files changed, 165 insertions(+), 16 deletions(-)

-- 
2.15.0




This bug report was last modified 5 years and 96 days ago.

Previous Next


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