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: zimoun <zimon.toutoune@gmail.com>, 58972@debbugs.gnu.org
Cc: "Ludovic Courtès" <ludo@gnu.org>,
	"Maxime Devos" <maximedevos@telenet.be>,
	"Leo Famulari" <leo@famulari.name>
Subject: [bug#58972] [PATCH 1/3] guix: ui: Handle single outputs.
Date: Thu, 03 Nov 2022 20:19:39 +0100	[thread overview]
Message-ID: <5290648a3690bdc41e5dc9177d2d70475b5af738.camel@gmail.com> (raw)
In-Reply-To: <86r0ykcsyy.fsf@gmail.com>

Am Donnerstag, dem 03.11.2022 um 10:01 +0100 schrieb zimoun:
> Hi,
> 
> On Wed, 02 Nov 2022 at 21:01, Liliana Marie Prikler
> <liliana.prikler@gmail.com> wrote:
> 
> > The current code says "out" contains "everything else", even if
> > there's no
> > other output to contain anything.
> > 
> > * guix/ui.scm (package->recutils)[default-output-synopses]: New
> > variable.
> > [output->recutils]: Take default synopses as argument.
> > ["outputs"]: Distinguish single and multiple outputs.
> > ---
> >  guix/ui.scm | 29 ++++++++++++++++++++---------
> >  1 file changed, 20 insertions(+), 9 deletions(-)
> 
> LGTM.
> 
> 
> > +  (define %default-output-synopses
> 
> [...]
> 
> > +      ("out" . ,(G_ "everything else"))))
> > +
> > +  (define* (output->recutils package output #:optional
> > +                             (default-synopses %default-output-
> > synopses))
> 
> [...]
> 
> > +      (assoc-ref default-synopses output)
> 
> Out of curiosity…
> 
> > +  (match (package-outputs/out-last p)
> > +    (("out")                            ; one output has
> > everything
> > +     (format port "outputs:~%~a~%"
> > +             (output->recutils p "out"
> > +                               (cons `("out" . ,(G_ "everything"))
> > +                                     %default-output-synopses))))
> 
> …is this ’cons’ instead of deletion because of performance?
It makes no functional difference and we only want non-destructive
changes.  That being said, perhaps alist-cons should have been used
instead.

Cheers

  reply	other threads:[~2022-11-03 19:21 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-02 20:19 [bug#58972] [PATCH 0/3] Improve output descriptions Liliana Marie Prikler
2022-11-02 20:01 ` [bug#58972] [PATCH 1/3] guix: ui: Handle single outputs Liliana Marie Prikler
2022-11-03  9:01   ` zimoun
2022-11-03 19:19     ` Liliana Marie Prikler [this message]
2022-11-02 20:01 ` [bug#58972] [PATCH v2 " Liliana Marie Prikler
2022-11-04 10:07   ` Ludovic Courtès
2022-11-02 20:10 ` [bug#58972] [PATCH v2 2/3] guix: ui: Improve missing output descriptions Liliana Marie Prikler
2022-11-04  9:55   ` Ludovic Courtès
2022-11-02 20:10 ` [bug#58972] [PATCH 2/3] guix: ui: Use a shrug emoji when " Liliana Marie Prikler
2022-11-02 20:51   ` ( via Guix-patches via
2022-11-02 21:25     ` ( via Guix-patches via
2022-11-03  9:10   ` zimoun
2022-11-03 15:05   ` Ludovic Courtès
2022-11-02 20:16 ` [bug#58972] [PATCH 3/3] guix: ui: Add default synopsis for “doc” output Liliana Marie Prikler
2022-11-03  9:10   ` zimoun
2022-11-03 15:06     ` Ludovic Courtès
2022-11-05  9:35       ` bug#58972: " Liliana Marie Prikler
2022-11-02 20:16 ` [bug#58972] [PATCH v2 " Liliana Marie Prikler
2022-11-04  8:43   ` zimoun

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=5290648a3690bdc41e5dc9177d2d70475b5af738.camel@gmail.com \
    --to=liliana.prikler@gmail.com \
    --cc=58972@debbugs.gnu.org \
    --cc=leo@famulari.name \
    --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.