all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Liliana Marie Prikler <liliana.prikler@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: Andrew Tropin <andrewtropin@gmail.com>,
	55653@debbugs.gnu.org, Maxime Devos <maximedevos@telenet.be>,
	zimoun <zimon.toutoune@gmail.com>
Subject: [bug#55653] [PATCH] guix: Add syntactic sugar for profile generation.
Date: Thu, 02 Jun 2022 18:51:38 +0200	[thread overview]
Message-ID: <bcdbcc03dd46ca8a743115d3ea4273eb95e61a6e.camel@gmail.com> (raw)
In-Reply-To: <87sfonp4vr.fsf@gnu.org>

Am Donnerstag, dem 02.06.2022 um 15:32 +0200 schrieb Ludovic Courtès:
> Hallo!
> 
> Liliana Marie Prikler <liliana.prikler@gmail.com> skribis:
> 
> > If it reads like that, then that's probably a mistake somewhere. 
> > My actual proposal to allow both of the following:
> > 
> > (package
> >   other-fields ...
> >   (manifest some-manifest))
> > (package 
> >   other-fields ...
> >   (packages (list bash coreutils emacs ...)))
> 
> Oh OK, I got it wrong, sorry.
Actually, I too got it wrong in the patch description.  The
implementation and test should be fine though.

> Still I’m not a fan of having syntax that looks like a field but is
> not an actual field, if we can avoid it.  I prefer to expose the data
> structure as it exists and, if needed, to build abstractions on top
> of it.
I can see where you're coming from, but IMHO the content field does not
itself provide a useful abstraction, and changing the profile record +
constructor would itself break ABI.  Thus the syntactic sugar.


> [...]
> > My use case of naming profiles would be served by such a procedure,
> > but using a syntactic constructor has other benefits in that all of
> > the fields of the profile become accessible.  That means that users
> > could (once profile management via Guix Home is implemented) for
> > instance run less hooks or additional hooks for certain profiles,
> > allow collisions, use relative symlinks, etc. for basically free,
> > not to mention that changes which break record ABI (such as added
> > fields) get promoted directly through syntax but not through a
> > plain procedure.
> 
> This is an argument (and probably a good one) in favor of using
> <profile> records.  I don’t read it as an argument in favor of the
> ‘packages’ pseudo field though?
Indeed, my argument for the pseudo-field is mere readability.  Compare
the four semantically equivalent ways of writing a profile in the test
case I added.

Cheers




      parent reply	other threads:[~2022-06-02 16:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-26  9:01 [bug#55653] [PATCH] guix: Add syntactic sugar for profile generation Liliana Marie Prikler
2022-05-27 12:39 ` andrew
2022-05-31 13:47 ` Ludovic Courtès
2022-05-31 18:07   ` Liliana Marie Prikler
2022-06-01 19:43     ` Ludovic Courtès
2022-06-01 20:15       ` Liliana Marie Prikler
2022-06-01 20:34         ` Maxime Devos
2022-06-02 13:32         ` Ludovic Courtès
2022-06-02 15:07           ` Maxime Devos
2022-06-02 16:51           ` Liliana Marie Prikler [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bcdbcc03dd46ca8a743115d3ea4273eb95e61a6e.camel@gmail.com \
    --to=liliana.prikler@gmail.com \
    --cc=55653@debbugs.gnu.org \
    --cc=andrewtropin@gmail.com \
    --cc=ludo@gnu.org \
    --cc=maximedevos@telenet.be \
    --cc=zimon.toutoune@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.