guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: zimoun
Subject: [bug#50614] [PATCH core-updates] build: utils: Add ‘optional’ macro.
Date: Mon, 20 Sep 2021 13:03:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Hi,

On Sun, 19 Sep 2021 at 15:50, Xinglu Chen <public@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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]