[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#58972] [PATCH 1/3] guix: ui: Handle single outputs.
From: |
Liliana Marie Prikler |
Subject: |
[bug#58972] [PATCH 1/3] guix: ui: Handle single outputs. |
Date: |
Thu, 03 Nov 2022 20:19:39 +0100 |
User-agent: |
Evolution 3.46.0 |
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