-v or --verbose CLI argument input is undocumented in the CLI

  • Open
  • quality assurance status badge
Details
2 participants
  • jgart
  • Simon Tournier
Owner
unassigned
Submitted by
jgart
Severity
normal
J
(address . bug-guix@gnu.org)
00781330fbd65f97724d7c93d9b87f09@dismail.de
User story:

jgart tries to build a currently broken Python music package:

$ guix build -v 6 music21

Hmmm, what is the allowed input range for -v/--verbosity command line flag?

$ guix build --help
-v, --verbosity=LEVEL use the given verbosity LEVEL

Hmmm, what is the type and/or range of inputs that are valid for LEVEL?

Darn, I have to go find what the underlying implementation function takes as a valid verbosity level in the source code instead of just reading the documentation output of `guix build --help`.

...but I just want to know everything that I need to know from just using the CLI and its help system as the user.

jgart adds TODO to document the valid levels in the CLI verbosity option itself

jgart thinks but what if the help message on the valid levels is too long once added?

jgart goes to get ice cream
S
S
Simon Tournier wrote on 25 Apr 2023 14:36
86cz3sb0l3.fsf@gmail.com
Hi,

On Sun, 23 Apr 2023 at 15:27, "jgart" via Bug reports for GNU Guix <bug-guix@gnu.org> wrote:

Toggle quote (3 lines)
> Hmmm, what is the type and/or range of inputs that are valid for
> LEVEL?

What about this patch?
Toggle diff (17 lines)
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index 72a24f91ac..35cb888c3b 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -452,8 +452,10 @@ (define (show-help)
-r, --root=FILE make FILE a symlink to the result, and register it
as a garbage collector root"))
(display (G_ "
- -v, --verbosity=LEVEL use the given verbosity LEVEL"))
- (display (G_ "
+ -v, --verbosity=LEVEL use the given verbosity LEVEL, range 0-3
+ 0 = no output, 1 = quiet, 2 = 1 + download URLs,
+ 3 = all on standard error"))
+ (display (G_ "
-q, --quiet do not show the build log"))
(display (G_ "
--log-file return the log file names for the given derivations"))
Cheers,
simon
?