[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#58972] [PATCH 1/3] guix: ui: Handle single outputs.
From: |
zimoun |
Subject: |
[bug#58972] [PATCH 1/3] guix: ui: Handle single outputs. |
Date: |
Thu, 03 Nov 2022 10:01:09 +0100 |
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?
Cheers,
simon