bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Add 'guix hash'.


From: Nikita Karetnikov
Subject: Re: [PATCH] Add 'guix hash'.
Date: Tue, 09 Apr 2013 20:28:52 +0400

> I think it’d be nice to have a ‘warning’ procedure in (guix ui), so
> things are uniform.  Furthermore, ‘guix-main’ could do:

>   (parameterize ((current-script-name arg0))
>     ...)

> so that ‘warning’ and similar procedures could pick up the program
> name from there.

Not sure how to do it.  How can I get the result of 'guix-main' from a
relevant script (e.g., 'guix/scripts/hash.scm')?

I assume that 'parameterize' should be placed inside 'guix-main'.  But
how can 'warning' access its internals?  Note that I'm new to
'parameterize' and I'm not really comfortable with it.  (Yep, I've read
the manual.)

> Would you like to work on this, in a separate patch?

Yes, I'd like to push it prior to 'guix hash'.  But it seems that you'll
do all the work if you answer my questions.  So feel free to push if the
patch is just a couple of lines.

> I was thinking that it might be enough to list the supported formats
> in the manual, and not in --help, which should remain concise.  WDYT?

Of course, it should be concise but also helpful.  I was puzzled when I
saw it for the first time.  So I still think that we should mention the
formats in the output of '--help'.  I'll create a patch for
'guix download' if you agree.

>>> Also, could you add an entry in the manual (with a couple of
>>> sentences explaining when users should care about this tool, and
>>> what it does), as well as a line in po/POTFILES.in?

>> Done.  But what is a translatable string?  Is it a string that should
>> be i18n'd?

> Yes, introduced by a call to the ‘gettext’ procedure, of which ‘_’ is
> an alias.

Why should we keep track of such files?

Also, what is the purpose of 'let' in 'guix-main'?  If I get it right,
it's used to isolate some functions [1].  But 'option?' is not a
top-level function.  So why bother?  (I expect it's not that easy.)

A similar approach is used in 'scripts/guix'.

[1] https://gnu.org/software/guile/manual/guile.html#Internal-Definitions

Attachment: pgp5XDRGAja0u.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]