all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Extending 'guix download'
@ 2015-02-01 20:34 David Thompson
  2015-02-02 22:00 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: David Thompson @ 2015-02-01 20:34 UTC (permalink / raw
  To: guix-devel

I'm looking for thoughts about what the CLI should look like for an
improved 'guix download' that is capable of downloading git repos, svn
repos, etc. in addition to files over HTTP.  There could be to be
additional context-sensitive switches to specify details beyond a URL.
For example, git repos need a commit SHA.

    guix download --method=git --commit=74217b9 git@gitorious.org/foo/foo.git

Or perhaps more flags aren't needed and we can use a specific order of
arguments:

    guix download --method=git git@gitorious.org/foo/foo.git 74217b9

Or we could create subcommands for each download method:

    guix download git git@gitorious.org/foo/foo.git 74217b9

I really don't know what the best option is, because I'm not very
experienced with writing sensible command-line interfaces.

Thoughts?

-- 
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate

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

* Re: Extending 'guix download'
  2015-02-01 20:34 Extending 'guix download' David Thompson
@ 2015-02-02 22:00 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2015-02-02 22:00 UTC (permalink / raw
  To: David Thompson; +Cc: guix-devel

David Thompson <dthompson2@worcester.edu> skribis:

> I'm looking for thoughts about what the CLI should look like for an
> improved 'guix download' that is capable of downloading git repos, svn
> repos, etc. in addition to files over HTTP.

(It handles any scheme supported by ‘url-fetch’, which includes
mirror:// etc.)

> There could be to be additional context-sensitive switches to specify
> details beyond a URL.  For example, git repos need a commit SHA.
>
>     guix download --method=git --commit=74217b9 git@gitorious.org/foo/foo.git
>
> Or perhaps more flags aren't needed and we can use a specific order of
> arguments:
>
>     guix download --method=git git@gitorious.org/foo/foo.git 74217b9
>
> Or we could create subcommands for each download method:
>
>     guix download git git@gitorious.org/foo/foo.git 74217b9

That would be useful.  Option #3 is too verbose IMO.  I have a slight
preference for #2.

The question is more whether the implementation could automatically map
command-line arguments to objects (‘git-reference’, ‘svn-reference’,
etc.), or if we’d rather go for something custom.

The former might be nice but might result in a clumsy CLI; the latter is
less elegant but might allow for a nicer CLI.

WDYT?

Ludo’.

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

end of thread, other threads:[~2015-02-02 22:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-01 20:34 Extending 'guix download' David Thompson
2015-02-02 22:00 ` Ludovic Courtès

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.