all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Eric Bavier <ericbavier@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] guix: build: Add transitive source building.
Date: Sun, 01 Feb 2015 22:02:42 +0100	[thread overview]
Message-ID: <87fvapfiq5.fsf@gnu.org> (raw)
In-Reply-To: <87r3uesmgq.fsf@member.fsf.org> (Eric Bavier's message of "Wed, 28 Jan 2015 14:02:13 -0600")

Eric Bavier <ericbavier@gmail.com> skribis:

> This patch is intended mostly for discussion.  It was brought up again
> on IRC yesterday the idea of prefetching package source into the store
> in order to be able to hack on guix offline.

Excellent!

> +(define (package-source* package)
> +  "List package-source but returns its results as a list"
> +  (list (package-source package)))

What about using the plural, ‘package-sources’, which makes it clear
that it returns a list?

> +(define (package-direct-source package)
> +  "Return all source origins associated with PACKAGE; including origins in

Likewise, plural.

> +(define (package-transitive-source package)
> +  "Return PACKAGE's direct sources, and its input sources, recursively."

Ditto.

> I've tested this patch by building e.g. gmsh (which I did not already
> have in the store)::
>
>   $ guix build --source=transitive gmsh
>   [...]
>   <disconnect network>
>   $ guix build gmsh

Neat!  This is indeed the use case that had been discussed with Nikita a
while back.

> The build succeeded after building the glu, glproto, fltk, and
> xf86vidmodeproto inputs from source.  I haven't yet tried making a
> change that would require rebootstrapping while offline.  I think the
> idea is that this should work.

Yes.

> What I'd like to get some feedback on:
>
> 1. Adding an optional argument to `guix build --source` currently breaks
>    `guix build -S foo`, since the option parsing thinks "foo" is the
>    argument for -S.  I'm not sure how this could be reconciled.

I think this is a problem, perhaps because I’m used to ‘guix build -S
foo’ and I wouldn’t want to do more typing for something like this.  ;-)

I can think of two options to work around it:

  1. Add a separate option, say, --sources={transitive,all,package}.

  2. Make it a separate command, say ‘guix prefetch’ with just the
     option ‘--sources={transitive,all}’.

WDYT?

> 2. There might be clearer user/developer-facing names for the arguments.

I think that’s fine.

> 3. Am I understanding the use-case?

I think so.  Andreas notes that when one just plans to modify a leaf
package while on the train, running something like ‘guix environment
the-leaf -E true’ is enough to fetch the dependencies of that package.
But I think that’s a slightly different use case anyway.

Thanks,
Ludo’.

      reply	other threads:[~2015-02-01 23:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-28 20:02 [PATCH] guix: build: Add transitive source building Eric Bavier
2015-02-01 21:02 ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fvapfiq5.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=ericbavier@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.