GNU bug report logs - #42164
Combining file-append with gexps results in incomprehensible errors

Previous Next

Package: guix;

Reported by: Jakub Kądziołka <kuba <at> kadziolka.net>

Date: Thu, 2 Jul 2020 12:01:02 UTC

Severity: normal

Done: Maxime Devos <maximedevos <at> telenet.be>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Maxime Devos <maximedevos <at> telenet.be>
To: Brian Cully <bjc <at> spork.org>, 42164 <at> debbugs.gnu.org
Subject: bug#42164: Combining file-append with gexps results in incomprehensible errors
Date: Sat, 23 Apr 2022 19:06:34 +0200
[Message part 1 (text/plain, inline)]
Brian Cully schreef op za 23-04-2022 om 12:03 [-0400]:
> 	I was having a similar issue, so I dug into this issue a bit,
> and it turns out that you *can* select an output from file-append, but
> the syntax is a bit wonky:
> 
> ---[snip]---
> (let ((fa (file-append pkg "/path")))
>   $~$#fa:output)
> ---[snip]---
> 
> 	I’ve tried to remove the let:
> 
> ---[snip]---
> $~$#(file-append pkg "/path"):output
> ---[snip]---

Do you mean #~#$fa:output here?

> 
> 	But this confuses the reader, an it things ‘:output’ is a
> variable. Not too surprising, but it does make the Guix configuration
> files more awkward, since now you have to ‘define’ the file-append
> operations at the top level so you can refer to them with the syntax
> above.
> 
> 	I would prefer to have something like any of the following (in
> order of preference):
> 
> ---[snip]---
> (file-append pkg:output "/path")

This one is only possible if file-append becomes syntax instead of a
procedure.

> (file-append (list pkg "output") "/path")

Possible, but seems semantically wrong to me -- what's a list doing in
a file-manipulating procedure?

> (file-append $~$#pkg:output "/path")

I assume this would be #~#$pkg:output?

My bikeshed proposal:

  (file-append (output glibc "static") "/lib/...")

Here, 'output' is a procedure constructing some kind of object.
This would also be useful outside 'file-append', as it allows
programmatically constructing equivalents #~#$pkg:output for multiple
'output' (there was some package definition some while back where this
would have been useful).

This 'output' could perhaps also be used in 'inputs' / 'native-inputs'
fields.  YMMV.

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

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

Previous Next


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