guix-devel
[Top][All Lists]
Advanced

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

Re: Add guix install command


From: Thompson, David
Subject: Re: Add guix install command
Date: Fri, 7 Aug 2015 08:22:20 -0400

On Fri, Aug 7, 2015 at 8:01 AM, Andy Wingo <address@hidden> wrote:
> On Fri 07 Aug 2015 10:48, Ricardo Wurmus <address@hidden> writes:
>
>>>> Attached is a patch to implement "guix install".  It just copies over
>>>> functionality from guix package.  We could refactor more but I would
>>>> start with this as it is; when things need changes is the time to
>>>> refactor, at least for me.  What do you think? :)
>>>
>>> I don't mind the new commands, but I think this patch is unacceptable
>>> because of the huge code duplicating.  Sorry if it was sounded rude, I
>>
>> Would it be possible to implement this with stubs for “guix install” and
>> “guix search” that serve as mere aliases to “guix package -i” and “guix
>> package -s”?
>>
>> I think it would be nice to have these commands as long as they are just
>> aliases and don’t duplicate code.
>
> In the case of "guix install", yes.  However what would you show for
> "guix install --help"?  What would error messages show: "guix package"
> or "guix install"?  Would the user perceive it as a separate command or
> would the fact that it is an alias be visible to the user?

If we were to go the aliasing route, we could still make the --help
and --version flags show 'guix install' with a simple pattern match on
the arguments list.

> I have a lot of opinions of course ;) but IMO for a user it's better for
> it to present as a separate command.  Why?  Because understanding all of
> "guix package" (or simply paging it back into human memory) is harder
> than understanding all of "guix install".  Describing "guix install" is
> easier than describing "guix package".

I definitely see where you are coming from, and you're not the first
person to suggest something like this, but for some reason I'm just
not sure about it.  It's good in the sense that users coming from apt
and yum could just type the thing they think should work and it will
work.  The downside is that it leaks profile management into many
subcommands and users will still need to use another tool to roll back
generations, update, or remove packages ('guix package' lets you do it
all in a single transaction).  Managing profiles is but one of the
many things that Guix does, and every other tool encapsulates it's
full functionality under a single subcommand: import, system,
environment, gc, lint, etc.

> Also FWIW the equivalent of "guix package --install-from-expression foo"
> is, as of this patch, "guix install --from-expression foo".  Reads nicer
> to me but dunno, might be a point of conflict.

I would agree that it reads a bit nicer.

> For search, I chose to default to a more terse format (--short rather
> than --recutils).  Also the --recutils and --short options probably
> don't make sense as arguments to "guix package", at least not named how
> they are.
>
> Basically it seems to me that "guix package" is doing too much as it
> is.  Dunno how you see it though.  I am new here :)

I think we should wait to hear Ludovic's thoughts when he's back from
vacation since he designed the interface.  Thanks for starting the
discussion with this patch.

- Dave



reply via email to

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