GNU bug report logs - #55653
[PATCH] guix: Add syntactic sugar for profile generation.

Previous Next

Package: guix-patches;

Reported by: Liliana Marie Prikler <liliana.prikler <at> gmail.com>

Date: Thu, 26 May 2022 09:20:02 UTC

Severity: normal

Tags: patch

Full log


Message #17 received at 55653 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Cc: Andrew Tropin <andrewtropin <at> gmail.com>, 55653 <at> debbugs.gnu.org,
 Maxime Devos <maximedevos <at> telenet.be>, zimoun <zimon.toutoune <at> gmail.com>
Subject: Re: bug#55653: [PATCH] guix: Add syntactic sugar for profile
 generation.
Date: Wed, 01 Jun 2022 21:43:54 +0200
Hi,

Liliana Marie Prikler <liliana.prikler <at> gmail.com> skribis:

> Am Dienstag, dem 31.05.2022 um 15:47 +0200 schrieb Ludovic Courtès:
>> So the goal is to make things slightly more concise than:
>> 
>>   (profile (content (packages->manifest (list …))))
>> 
>> right?
> More or less.  However, I also feel that "content" is somewhat
> confusing if it were to be user-facing so I added a syntactic manifest
> noop as well.

OK.

>> We don’t have syntactic sugar like this elsewhere, and I would prefer
>> to remain consistent here.  
> We do have origin sha256, which sets both hash-algo and hash-content,
> so it's not unprecedented in my opinion.

‘sha256’ is a backward-compatibility hack for ‘content-hash’, so it’s a
bit different in my view.

To be clear, what I meant is that record construction always look like
this:

  (constructor
    (field1 value1)
    (field2 value2))

whereas here the proposal (IIUC) is:

  (constructor
    (field1 several values that get bundled together magically))

>> However, if that helps, we could have a procedure, like:
>> 
>>   (define (packages->profile name packages)
>>     (profile (name name) …))
>> 
>> Thoughts?
> I do think syntactic constructors feel better here, because the end
> goal would be embedding things in (thunked) configuration fields. 
> Having a procedure might be acceptable, but feels more clunky in the
> context of Guix.

To me, ‘packages->profile’ doesn’t look any more clunky than
‘packages->manifest’ or similar procedures.

Do you think a procedure like this would address the verbosity problem
that prompted you to propose this patch?

Thanks,
Ludo’.




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

Previous Next


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