unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#54454] [PATCH] ui: Describe package outputs.
@ 2022-03-18 19:16 Liliana Marie Prikler
  2022-03-18 20:12 ` Maxime Devos
                   ` (4 more replies)
  0 siblings, 5 replies; 19+ messages in thread
From: Liliana Marie Prikler @ 2022-03-18 19:16 UTC (permalink / raw)
  To: 54454

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2496 bytes --]

* guix/ui.scm (package->recutils): Output outputs with their descriptions,
one per line.
---
Salut Guix,

People have been complaining for a while, that outputs are not really
discoverable [who?].  This patch attempts to fix that by displaying each
on their own line with a (hopefully) helpful description next to it.
It is expected, that these descriptions do not span multiple lines.

Cheers

 guix/ui.scm | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/guix/ui.scm b/guix/ui.scm
index 6c194eb3c9..dfa90126bc 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -17,6 +17,7 @@
 ;;; Copyright © 2020 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2018 Steve Sprang <scs@stevesprang.com>
+;;; Copyright © 2022 Liliana Marie Prikler <liliana.prikler@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1543,13 +1544,33 @@ (define (dependencies->recutils packages)
                                    (sort packages package<?))) " ")))
       (split-lines list (string-length "dependencies: "))))
 
+  (define (output->recutils package output)
+    (let ((descs (assq-ref (package-properties package) 'output-descriptions)))
+      (string-append
+       "+ " output ": "
+       (or
+        (assoc-ref descs output)
+        (assoc-ref `(("bin" . ,(G_ "executable programs and scripts."))
+                     ("debug" . ,(G_ "debug information."))
+                     ("lib" . ,(G_ "shared libraries."))
+                     ("static" . ,(G_ "static libraries."))
+                     ("out" . ,(G_ "everything else.")))
+                   output)
+        (G_ "state secrets.")))))
+
+  (define (package-outputs/out-last package)
+    ((compose append partition)
+     (negate (cut string=? "out" <>))
+     (package-outputs package)))
+
   (define (package<? p1 p2)
     (string<? (package-full-name p1) (package-full-name p2)))
 
   ;; Note: Don't i18n field names so that people can post-process it.
   (format port "name: ~a~%" (package-name p))
   (format port "version: ~a~%" (package-version p))
-  (format port "outputs: ~a~%" (string-join (package-outputs p)))
+  (format port "outputs:~%~{~a~%~}"
+          (map (cut output->recutils p <>) (package-outputs/out-last p)))
   (format port "systems: ~a~%"
           (split-lines (string-join (package-transitive-supported-systems p))
                        (string-length "systems: ")))
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [bug#54454] [PATCH] ui: Describe package outputs.
  2022-03-18 19:16 [bug#54454] [PATCH] ui: Describe package outputs Liliana Marie Prikler
@ 2022-03-18 20:12 ` Maxime Devos
  2022-03-18 20:23   ` Liliana Marie Prikler
  2022-03-18 20:16 ` Maxime Devos
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 19+ messages in thread
From: Maxime Devos @ 2022-03-18 20:12 UTC (permalink / raw)
  To: Liliana Marie Prikler, 54454

[-- Attachment #1: Type: text/plain, Size: 799 bytes --]

Liliana Marie Prikler schreef op vr 18-03-2022 om 20:16 [+0100]:
> +        (assoc-ref `(("bin" . ,(G_ "executable programs and scripts."))
> +                     ("debug" . ,(G_ "debug information."))
> +                     ("lib" . ,(G_ "shared libraries."))
> +                     ("static" . ,(G_ "static libraries."))
> +                     ("out" . ,(G_ "everything else.")))

Some other outputs in the wild: "python", "utils", "xpi", "firefox",
"chromium", "gui", "doc", "drill", "examples", "pyldns", "nm", "gtk2",
"gtk3", "gtk4", "module", "src", "woff2", "headless", "installer",
"jdk", "qt", "tester", "pulseaudio", "jack", "image", "opt-viewer",
"examples", "metis", "cargo".

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [bug#54454] [PATCH] ui: Describe package outputs.
  2022-03-18 19:16 [bug#54454] [PATCH] ui: Describe package outputs Liliana Marie Prikler
  2022-03-18 20:12 ` Maxime Devos
@ 2022-03-18 20:16 ` Maxime Devos
  2022-03-18 20:25   ` Liliana Marie Prikler
  2022-03-18 20:54 ` Maxime Devos
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 19+ messages in thread
From: Maxime Devos @ 2022-03-18 20:16 UTC (permalink / raw)
  To: Liliana Marie Prikler, 54454

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

Liliana Marie Prikler schreef op vr 18-03-2022 om 20:16 [+0100]:
> +        (G_ "state secrets.")))))

Wouldn't this require #:substitutable? #false?
It's punny but rather inaccurate ...
WDYT of adding a package property to allow packages to document unusual
outputs?

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [bug#54454] [PATCH] ui: Describe package outputs.
  2022-03-18 20:12 ` Maxime Devos
@ 2022-03-18 20:23   ` Liliana Marie Prikler
  0 siblings, 0 replies; 19+ messages in thread
From: Liliana Marie Prikler @ 2022-03-18 20:23 UTC (permalink / raw)
  To: Maxime Devos, 54454

Am Freitag, dem 18.03.2022 um 21:12 +0100 schrieb Maxime Devos:
> Liliana Marie Prikler schreef op vr 18-03-2022 om 20:16 [+0100]:
> > +        (assoc-ref `(("bin" . ,(G_ "executable programs and
> > scripts."))
> > +                     ("debug" . ,(G_ "debug information."))
> > +                     ("lib" . ,(G_ "shared libraries."))
> > +                     ("static" . ,(G_ "static libraries."))
> > +                     ("out" . ,(G_ "everything else.")))
> 
> Some other outputs in the wild: "python", "utils", "xpi", "firefox",
> "chromium", "gui", "doc", "drill", "examples", "pyldns", "nm",
> "gtk2",
> "gtk3", "gtk4", "module", "src", "woff2", "headless", "installer",
> "jdk", "qt", "tester", "pulseaudio", "jack", "image", "opt-viewer",
> "examples", "metis", "cargo".
Oh, right, I just put in the most common ones.  Of the ones you cite,
"doc", "examples", "gui", "src" "utils", and perhaps "cargo" make sense
if defined like this, the others appear rather specific.  "python" in
particular sounds like it might have multiple meanings.

Cheers




^ permalink raw reply	[flat|nested] 19+ messages in thread

* [bug#54454] [PATCH] ui: Describe package outputs.
  2022-03-18 20:16 ` Maxime Devos
@ 2022-03-18 20:25   ` Liliana Marie Prikler
  2022-03-18 20:50     ` Maxime Devos
  0 siblings, 1 reply; 19+ messages in thread
From: Liliana Marie Prikler @ 2022-03-18 20:25 UTC (permalink / raw)
  To: Maxime Devos, 54454

Am Freitag, dem 18.03.2022 um 21:16 +0100 schrieb Maxime Devos:
> Liliana Marie Prikler schreef op vr 18-03-2022 om 20:16 [+0100]:
> > +        (G_ "state secrets.")))))
> 
> Wouldn't this require #:substitutable? #false?
> It's punny but rather inaccurate ...
You can substitute state secrets, but they will be marked to see who
leaked them.  It's not like all of our outputs are 100% reproducible,
are they? :P
> WDYT of adding a package property to allow packages to document
> unusual outputs?
That is literally the first thing I'm doing.  It is unimaginatively
called 'output-descriptions and checked before either of the fallbacks.

Cheers





^ permalink raw reply	[flat|nested] 19+ messages in thread

* [bug#54454] [PATCH] ui: Describe package outputs.
  2022-03-18 20:25   ` Liliana Marie Prikler
@ 2022-03-18 20:50     ` Maxime Devos
  0 siblings, 0 replies; 19+ messages in thread
From: Maxime Devos @ 2022-03-18 20:50 UTC (permalink / raw)
  To: Liliana Marie Prikler, 54454

[-- Attachment #1: Type: text/plain, Size: 617 bytes --]

Liliana Marie Prikler schreef op vr 18-03-2022 om 21:25 [+0100]:
> > WDYT of adding a package property to allow packages to document
> > unusual outputs?
> That is literally the first thing I'm doing.  It is unimaginatively
> called 'output-descriptions and checked before either of the
> fallbacks.

Indeed, I overlooked that.  That seems like something that needs to be
documented though (maybe in ‘package Reference’ or ‘Packages with
Multiple Outputs’, perhaps complemented by a linter that checks
that outputs without fallbacks are described in 'output-descriptions').

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [bug#54454] [PATCH] ui: Describe package outputs.
  2022-03-18 19:16 [bug#54454] [PATCH] ui: Describe package outputs Liliana Marie Prikler
  2022-03-18 20:12 ` Maxime Devos
  2022-03-18 20:16 ` Maxime Devos
@ 2022-03-18 20:54 ` Maxime Devos
  2022-03-18 22:24   ` Liliana Marie Prikler
  2022-03-19 16:24 ` Leo Famulari
  2022-06-26 12:37 ` [bug#54454] [PATCH v2] " Liliana Marie Prikler
  4 siblings, 1 reply; 19+ messages in thread
From: Maxime Devos @ 2022-03-18 20:54 UTC (permalink / raw)
  To: Liliana Marie Prikler, 54454

[-- Attachment #1: Type: text/plain, Size: 641 bytes --]

Liliana Marie Prikler schreef op vr 18-03-2022 om 20:16 [+0100]:
> +    (let ((descs (assq-ref (package-properties package) 'output-descriptions)))

Should the descriptions be thunked, in case the package modules
are loaded before the locale is set, or if the locale changes during
execution?  E.g., guix-data-service often changes locales, e.g. in
<https://git.savannah.gnu.org/cgit/guix/data-service.git/tree/guix-data-service/model/package-metadata.scm?id=8ab72e633ae700fe58bb3bf72aa155d62c2bc22e#n234>.
I don't know if old processes are reused or new processes are created,
but I'd assume the former.

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [bug#54454] [PATCH] ui: Describe package outputs.
  2022-03-18 20:54 ` Maxime Devos
@ 2022-03-18 22:24   ` Liliana Marie Prikler
  2022-03-18 22:57     ` Maxime Devos
  0 siblings, 1 reply; 19+ messages in thread
From: Liliana Marie Prikler @ 2022-03-18 22:24 UTC (permalink / raw)
  To: Maxime Devos, 54454

Am Freitag, dem 18.03.2022 um 21:54 +0100 schrieb Maxime Devos:
> Liliana Marie Prikler schreef op vr 18-03-2022 om 20:16 [+0100]:
> > +    (let ((descs (assq-ref (package-properties package) 'output-
> > descriptions)))
> 
> Should the descriptions be thunked, in case the package modules
> are loaded before the locale is set, or if the locale changes during
> execution?  E.g., guix-data-service often changes locales, e.g. in
> <
> https://git.savannah.gnu.org/cgit/guix/data-service.git/tree/guix-data-service/model/package-metadata.scm?id=8ab72e633ae700fe58bb3bf72aa155d62c2bc22e#n234
> >.
> I don't know if old processes are reused or new processes are
> created, but I'd assume the former.
Hmm, that's an interesting question.  For what it's worth neither
synopsis nor description seem thunked and those are also localized, so
I don't think it'd be an issue.

Cheers





^ permalink raw reply	[flat|nested] 19+ messages in thread

* [bug#54454] [PATCH] ui: Describe package outputs.
  2022-03-18 22:24   ` Liliana Marie Prikler
@ 2022-03-18 22:57     ` Maxime Devos
  2022-03-18 23:27       ` Liliana Marie Prikler
  0 siblings, 1 reply; 19+ messages in thread
From: Maxime Devos @ 2022-03-18 22:57 UTC (permalink / raw)
  To: Liliana Marie Prikler, 54454

[-- Attachment #1: Type: text/plain, Size: 388 bytes --]

Liliana Marie Prikler schreef op vr 18-03-2022 om 23:24 [+0100]:
> Hmm, that's an interesting question.  For what it's worth neither
> synopsis nor description seem thunked and those are also localized, so
> I don't think it'd be an issue.

Those work differently -- they don't use G_ or P_, instead the
localisation is delayed to 'package-field-string' and
'package->recutils'.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [bug#54454] [PATCH] ui: Describe package outputs.
  2022-03-18 22:57     ` Maxime Devos
@ 2022-03-18 23:27       ` Liliana Marie Prikler
  2022-03-19  8:56         ` Maxime Devos
  0 siblings, 1 reply; 19+ messages in thread
From: Liliana Marie Prikler @ 2022-03-18 23:27 UTC (permalink / raw)
  To: Maxime Devos, 54454

Am Freitag, dem 18.03.2022 um 23:57 +0100 schrieb Maxime Devos:
> Liliana Marie Prikler schreef op vr 18-03-2022 om 23:24 [+0100]:
> > Hmm, that's an interesting question.  For what it's worth neither
> > synopsis nor description seem thunked and those are also localized,
> > so
> > I don't think it'd be an issue.
> 
> Those work differently -- they don't use G_ or P_, instead the
> localisation is delayed to 'package-field-string' and
> 'package->recutils'.
IOW we'd have to wrap (assoc-ref descs output) in an (and=> <> P_)?




^ permalink raw reply	[flat|nested] 19+ messages in thread

* [bug#54454] [PATCH] ui: Describe package outputs.
  2022-03-18 23:27       ` Liliana Marie Prikler
@ 2022-03-19  8:56         ` Maxime Devos
  2022-03-19 10:48           ` Ludovic Courtès
  0 siblings, 1 reply; 19+ messages in thread
From: Maxime Devos @ 2022-03-19  8:56 UTC (permalink / raw)
  To: Liliana Marie Prikler, 54454

[-- Attachment #1: Type: text/plain, Size: 659 bytes --]

Liliana Marie Prikler schreef op za 19-03-2022 om 00:27 [+0100]:
> IOW we'd have to wrap (assoc-ref descs output) in an (and=> <> P_)?

I don't think that's sufficient, somehow the strings need to end up in
the .po files.  IIRC, there's some magic somewhere to add package
descriptions to the .po files even when they aren't wrapped in
(P_ "foo"), but I cannot locate it anywmore.

I was more thinking of:

(package
  [...]
  (properties
    `((output-descriptions 
         . ,(lambda () ("foo" . ,(G_ "Bar")) ...)))))

though bringing the magic used for package descriptions to
output descriptions would be tidier.

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [bug#54454] [PATCH] ui: Describe package outputs.
  2022-03-19  8:56         ` Maxime Devos
@ 2022-03-19 10:48           ` Ludovic Courtès
  0 siblings, 0 replies; 19+ messages in thread
From: Ludovic Courtès @ 2022-03-19 10:48 UTC (permalink / raw)
  To: Maxime Devos; +Cc: Liliana Marie Prikler, 54454

Hi,

Maxime Devos <maximedevos@telenet.be> skribis:

> I was more thinking of:
>
> (package
>   [...]
>   (properties
>     `((output-descriptions 
>          . ,(lambda () ("foo" . ,(G_ "Bar")) ...)))))
>
> though bringing the magic used for package descriptions to
> output descriptions would be tidier.

Rather:

  (properties '((output-descriptions
                  ("send-email" (synopsis "send email!")))))

That is, instead of calling ‘G_’, you just use one of the keywords
xgettext recognizes (see ‘po/packages/Makevars’).  The actual call to
‘gettext’ would then be made in (guix ui).

I wonder if we’re going overboard though?

Ludo’.




^ permalink raw reply	[flat|nested] 19+ messages in thread

* [bug#54454] [PATCH] ui: Describe package outputs.
  2022-03-18 19:16 [bug#54454] [PATCH] ui: Describe package outputs Liliana Marie Prikler
                   ` (2 preceding siblings ...)
  2022-03-18 20:54 ` Maxime Devos
@ 2022-03-19 16:24 ` Leo Famulari
  2022-06-26 12:37 ` [bug#54454] [PATCH v2] " Liliana Marie Prikler
  4 siblings, 0 replies; 19+ messages in thread
From: Leo Famulari @ 2022-03-19 16:24 UTC (permalink / raw)
  To: Liliana Marie Prikler; +Cc: 54454

On Fri, Mar 18, 2022 at 08:16:39PM +0100, Liliana Marie Prikler wrote:
> * guix/ui.scm (package->recutils): Output outputs with their descriptions,
> one per line.
> ---
> Salut Guix,
> 
> People have been complaining for a while, that outputs are not really
> discoverable [who?].  This patch attempts to fix that by displaying each
> on their own line with a (hopefully) helpful description next to it.
> It is expected, that these descriptions do not span multiple lines.

Excellent, thank you for stepping up to work on this!




^ permalink raw reply	[flat|nested] 19+ messages in thread

* [bug#54454] [PATCH v2] ui: Describe package outputs.
  2022-03-18 19:16 [bug#54454] [PATCH] ui: Describe package outputs Liliana Marie Prikler
                   ` (3 preceding siblings ...)
  2022-03-19 16:24 ` Leo Famulari
@ 2022-06-26 12:37 ` Liliana Marie Prikler
  2022-08-16 19:37   ` bug#54454: " Liliana Marie Prikler
  4 siblings, 1 reply; 19+ messages in thread
From: Liliana Marie Prikler @ 2022-06-26 12:37 UTC (permalink / raw)
  To: 54454; +Cc: Ludovic Courtès, Maxime Devos, Leo Famulari

* guix/ui.scm (package->recutils): Output outputs with their descriptions,
one per line.
* po/packages/Makevars (XGETTEXT_OPTIONS): Add ‘output-synopsis’ as keyword.
---
 guix/ui.scm          | 27 ++++++++++++++++++++++++++-
 po/packages/Makevars |  3 ++-
 2 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/guix/ui.scm b/guix/ui.scm
index a7acd41440..dad2b853ac 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -18,6 +18,7 @@
 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2018 Steve Sprang <scs@stevesprang.com>
 ;;; Copyright © 2022 Taiju HIGASHI <higashi@taiju.info>
+;;; Copyright © 2022 Liliana Marie Prikler <liliana.prikler@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1511,6 +1512,29 @@ (define (dependencies->recutils packages)
                                    (sort packages package<?))) " ")))
       (split-lines list (string-length "dependencies: "))))
 
+  (define (output->recutils package output)
+    (string-append
+     "+ " output ": "
+     (or
+      (any
+       (match-lambda
+         (('output-synopsis key synopsis)
+          (and (string=? key output) (P_ synopsis)))
+         (_ #f))
+       (package-properties package))
+      (assoc-ref `(("bin" . ,(G_ "executable programs and scripts"))
+                   ("debug" . ,(G_ "debug information"))
+                   ("lib" . ,(G_ "shared libraries"))
+                   ("static" . ,(G_ "static libraries"))
+                   ("out" . ,(G_ "everything else")))
+                 output)
+      (G_ "see Appendix H"))))
+
+  (define (package-outputs/out-last package)
+    ((compose append partition)
+     (negate (cut string=? "out" <>))
+     (package-outputs package)))
+
   (define (package<? p1 p2)
     (string<? (package-full-name p1) (package-full-name p2)))
 
@@ -1522,7 +1546,8 @@ (define highlighting*
   ;; Note: Don't i18n field names so that people can post-process it.
   (format port "name: ~a~%" (highlight (package-name p) port*))
   (format port "version: ~a~%" (highlight (package-version p) port*))
-  (format port "outputs: ~a~%" (string-join (package-outputs p)))
+  (format port "outputs:~%~{~a~%~}"
+          (map (cut output->recutils p <>) (package-outputs/out-last p)))
   (format port "systems: ~a~%"
           (split-lines (string-join (package-transitive-supported-systems p))
                        (string-length "systems: ")))
diff --git a/po/packages/Makevars b/po/packages/Makevars
index 4cdb98d8fe..65912786d8 100644
--- a/po/packages/Makevars
+++ b/po/packages/Makevars
@@ -10,7 +10,8 @@ top_builddir = ../..
 # synopses and descriptions.
 XGETTEXT_OPTIONS =				\
   --language=Scheme --from-code=UTF-8		\
-  --keyword=synopsis --keyword=description
+  --keyword=synopsis --keyword=description      \
+  --keyword=output-synopsis:2
 
 COPYRIGHT_HOLDER = the authors of Guix (msgids)
 
-- 
2.36.1





^ permalink raw reply related	[flat|nested] 19+ messages in thread

* bug#54454: [PATCH v2] ui: Describe package outputs.
  2022-06-26 12:37 ` [bug#54454] [PATCH v2] " Liliana Marie Prikler
@ 2022-08-16 19:37   ` Liliana Marie Prikler
  2022-09-02 17:07     ` [bug#54454] " Ludovic Courtès
  0 siblings, 1 reply; 19+ messages in thread
From: Liliana Marie Prikler @ 2022-08-16 19:37 UTC (permalink / raw)
  To: 54454-done; +Cc: Ludovic Courtès, Maxime Devos, Leo Famulari

Am Sonntag, dem 26.06.2022 um 14:37 +0200 schrieb Liliana Marie
Prikler:
> * guix/ui.scm (package->recutils): Output outputs with their
> descriptions,
> one per line.
> * po/packages/Makevars (XGETTEXT_OPTIONS): Add ‘output-synopsis’ as
> keyword.
I pushed this now.

Cheers




^ permalink raw reply	[flat|nested] 19+ messages in thread

* [bug#54454] [PATCH v2] ui: Describe package outputs.
  2022-08-16 19:37   ` bug#54454: " Liliana Marie Prikler
@ 2022-09-02 17:07     ` Ludovic Courtès
  2022-09-02 17:14       ` Liliana Marie Prikler
  0 siblings, 1 reply; 19+ messages in thread
From: Ludovic Courtès @ 2022-09-02 17:07 UTC (permalink / raw)
  To: Liliana Marie Prikler; +Cc: Leo Famulari, Maxime Devos, 54454-done

Hey,

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

> Am Sonntag, dem 26.06.2022 um 14:37 +0200 schrieb Liliana Marie
> Prikler:
>> * guix/ui.scm (package->recutils): Output outputs with their
>> descriptions,
>> one per line.
>> * po/packages/Makevars (XGETTEXT_OPTIONS): Add ‘output-synopsis’ as
>> keyword.
> I pushed this now.

Thanks for moving forward on this!

I get:

--8<---------------cut here---------------start------------->8---
$ guix show git |head -10
name: git
version: 2.37.2
outputs:
+ send-email: see Appendix H
+ svn: see Appendix H
+ credential-netrc: see Appendix H
+ credential-libsecret: see Appendix H
+ subtree: see Appendix H
+ gui: see Appendix H
+ out: everything else
--8<---------------cut here---------------end--------------->8---

Where can I see Appendix H though?  (Real question.)

Ludo’.




^ permalink raw reply	[flat|nested] 19+ messages in thread

* [bug#54454] [PATCH v2] ui: Describe package outputs.
  2022-09-02 17:07     ` [bug#54454] " Ludovic Courtès
@ 2022-09-02 17:14       ` Liliana Marie Prikler
  2022-09-03  9:53         ` zimoun
  0 siblings, 1 reply; 19+ messages in thread
From: Liliana Marie Prikler @ 2022-09-02 17:14 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Leo Famulari, Maxime Devos, 54454-done

Am Freitag, dem 02.09.2022 um 19:07 +0200 schrieb Ludovic Courtès:
> Hey,
> 
> Liliana Marie Prikler <liliana.prikler@gmail.com> skribis:
> 
> > Am Sonntag, dem 26.06.2022 um 14:37 +0200 schrieb Liliana Marie
> > Prikler:
> > > * guix/ui.scm (package->recutils): Output outputs with their
> > > descriptions,
> > > one per line.
> > > * po/packages/Makevars (XGETTEXT_OPTIONS): Add ‘output-synopsis’
> > > as
> > > keyword.
> > I pushed this now.
> 
> Thanks for moving forward on this!
> 
> I get:
> 
> --8<---------------cut here---------------start------------->8---
> $ guix show git |head -10
> name: git
> version: 2.37.2
> outputs:
> + send-email: see Appendix H
> + svn: see Appendix H
> + credential-netrc: see Appendix H
> + credential-libsecret: see Appendix H
> + subtree: see Appendix H
> + gui: see Appendix H
> + out: everything else
> --8<---------------cut here---------------end--------------->8---
> 
> Where can I see Appendix H though?  (Real question.)
There is no appendix H, it's an obscure reference to the appendix H of
the x86 instruction set (containing undocumented instructions or here
undocumented outputs 🙂️).

In order to have a more meaningful string, you'd need to add an output
synopsis property to the package like so: 
(properties 
  `(...
    (output-synopsis "send-email" "the `git send-email' command")
    (output-synopsis "credential-libsecret" "the libsecret credential
helper")
    ...))

The second string should (if I got everything right) be translatable
without needing to wrap it in a G_.

Cheers




^ permalink raw reply	[flat|nested] 19+ messages in thread

* [bug#54454] [PATCH v2] ui: Describe package outputs.
  2022-09-02 17:14       ` Liliana Marie Prikler
@ 2022-09-03  9:53         ` zimoun
  2022-09-05  7:25           ` Ludovic Courtès
  0 siblings, 1 reply; 19+ messages in thread
From: zimoun @ 2022-09-03  9:53 UTC (permalink / raw)
  To: Liliana Marie Prikler, Ludovic Courtès
  Cc: 54454-done, Maxime Devos, Leo Famulari

Hi,

Thanks for this nice improvement.

On Fri, 02 Sep 2022 at 19:14, Liliana Marie Prikler <liliana.prikler@gmail.com> wrote:

>> --8<---------------cut here---------------start------------->8---
>> $ guix show git |head -10
>> name: git
>> version: 2.37.2
>> outputs:
>> + send-email: see Appendix H
>> + svn: see Appendix H
>> + credential-netrc: see Appendix H
>> + credential-libsecret: see Appendix H
>> + subtree: see Appendix H
>> + gui: see Appendix H
>> + out: everything else
>> --8<---------------cut here---------------end--------------->8---
>> 
>> Where can I see Appendix H though?  (Real question.)
>
> There is no appendix H, it's an obscure reference to the appendix H of
> the x86 instruction set (containing undocumented instructions or here
> undocumented outputs 🙂️).

--8<---------------cut here---------------start------------->8---
+      (assoc-ref `(("bin" . ,(G_ "executable programs and scripts"))
+                   ("debug" . ,(G_ "debug information"))
+                   ("lib" . ,(G_ "shared libraries"))
+                   ("static" . ,(G_ "static libraries"))
+                   ("out" . ,(G_ "everything else")))
+                 output)
+      (G_ "see Appendix H"))))
--8<---------------cut here---------------end--------------->8---

Maybe we could just replace this “see Appendix H” by “undocumented”.

Or if we want to keep the reference, “see the non-existing Appendix H”.


Cheers,
simon




^ permalink raw reply	[flat|nested] 19+ messages in thread

* [bug#54454] [PATCH v2] ui: Describe package outputs.
  2022-09-03  9:53         ` zimoun
@ 2022-09-05  7:25           ` Ludovic Courtès
  0 siblings, 0 replies; 19+ messages in thread
From: Ludovic Courtès @ 2022-09-05  7:25 UTC (permalink / raw)
  To: zimoun; +Cc: 54454-done, Maxime Devos, Liliana Marie Prikler, Leo Famulari

Hi,

zimoun <zimon.toutoune@gmail.com> skribis:

> On Fri, 02 Sep 2022 at 19:14, Liliana Marie Prikler <liliana.prikler@gmail.com> wrote:
>
>>> --8<---------------cut here---------------start------------->8---
>>> $ guix show git |head -10
>>> name: git
>>> version: 2.37.2
>>> outputs:
>>> + send-email: see Appendix H
>>> + svn: see Appendix H
>>> + credential-netrc: see Appendix H
>>> + credential-libsecret: see Appendix H
>>> + subtree: see Appendix H
>>> + gui: see Appendix H
>>> + out: everything else
>>> --8<---------------cut here---------------end--------------->8---
>>> 
>>> Where can I see Appendix H though?  (Real question.)
>>
>> There is no appendix H, it's an obscure reference to the appendix H of
>> the x86 instruction set (containing undocumented instructions or here
>> undocumented outputs 🙂️).

Oooh, I see.  :-)

> +      (assoc-ref `(("bin" . ,(G_ "executable programs and scripts"))
> +                   ("debug" . ,(G_ "debug information"))
> +                   ("lib" . ,(G_ "shared libraries"))
> +                   ("static" . ,(G_ "static libraries"))
> +                   ("out" . ,(G_ "everything else")))
> +                 output)
> +      (G_ "see Appendix H"))))
>
> Maybe we could just replace this “see Appendix H” by “undocumented”.

+1!  For those like me who’d otherwise take it at face value.

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2022-09-05  7:27 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-18 19:16 [bug#54454] [PATCH] ui: Describe package outputs Liliana Marie Prikler
2022-03-18 20:12 ` Maxime Devos
2022-03-18 20:23   ` Liliana Marie Prikler
2022-03-18 20:16 ` Maxime Devos
2022-03-18 20:25   ` Liliana Marie Prikler
2022-03-18 20:50     ` Maxime Devos
2022-03-18 20:54 ` Maxime Devos
2022-03-18 22:24   ` Liliana Marie Prikler
2022-03-18 22:57     ` Maxime Devos
2022-03-18 23:27       ` Liliana Marie Prikler
2022-03-19  8:56         ` Maxime Devos
2022-03-19 10:48           ` Ludovic Courtès
2022-03-19 16:24 ` Leo Famulari
2022-06-26 12:37 ` [bug#54454] [PATCH v2] " Liliana Marie Prikler
2022-08-16 19:37   ` bug#54454: " Liliana Marie Prikler
2022-09-02 17:07     ` [bug#54454] " Ludovic Courtès
2022-09-02 17:14       ` Liliana Marie Prikler
2022-09-03  9:53         ` zimoun
2022-09-05  7:25           ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).