GNU bug report logs - #50614
[PATCH core-updates] build: utils: Add ‘optional’ macro.

Previous Next

Package: guix-patches;

Reported by: Xinglu Chen <public <at> yoctocell.xyz>

Date: Thu, 16 Sep 2021 07:12:02 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: zimoun <zimon.toutoune <at> gmail.com>
To: Xinglu Chen <public <at> yoctocell.xyz>
Cc: 50614 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler <at> gmail.com>, Sarah Morgensen <iskarian <at> mgsn.dev>
Subject: [bug#50614] [PATCH core-updates] build: utils: Add ‘optional’ macro.
Date: Mon, 20 Sep 2021 13:03:34 +0200
Hi,

On Sun, 19 Sep 2021 at 15:50, Xinglu Chen <public <at> yoctocell.xyz> wrote:

> +@lisp
> +(if @var{test}
> +    (list @var{consequent} @dots{})
> +    '())
> +@end lisp

[...]

> +@lisp
> +(arguments
> + `(#:configure-flags (list "--localstatedir=/var"
> +                           "--sysconfdir=/etc"
> +                           ,@@(list-when (hurd-target?) "--with-courage"))))
> +@end lisp

Personally, I am not convinced it helps the readibility.  But that’s a
matter of taste. :-)

My concern is about the coherence.  First, ’list-unless’ is also
required by a similar pattern, see for instance:

--8<---------------cut here---------------start------------->8---
gnu/packages/guile.scm:162:             ,@(if (target-mingw?) '() `(("bash" ,bash-minimal)))))
--8<---------------cut here---------------end--------------->8---

And second, these 2 patterns ’list-when’ and ’list-unless’ are used in
by many files, see guix/build-system, guix/import, guix/describe,
gnu/packages, gnu/system, gnu/services files.  For the oneline pattern:
“ag --scheme '@\(if' | grep '()'”.  All should be replaced; which
implies a world-rebuild I guess.

Well, all in all, I am not convinced that all this work is worth for a
small debatable readibility improvement. :-)

All the best,
simon




This bug report was last modified 3 years and 267 days ago.

Previous Next


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