From: Nils Gillmann <ng0@n0.is>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 27284@debbugs.gnu.org, Maxim Cournoyer <maxim.cournoyer@gmail.com>
Subject: bug#27284: ‘guix pull’ builds using multiple derivations
Date: Tue, 27 Mar 2018 19:25:18 +0000 [thread overview]
Message-ID: <20180327192518.rynrei7mr3qk3ocl@abyayala> (raw)
In-Reply-To: <87d0zpyj5d.fsf_-_@gnu.org>
Awesome news!
Ludovic Courtès transcribed 3.1K bytes:
> Hello Guix!
>
> News from the front! I’ve pushed a new ‘wip-pull-multiple-derivations’
> branch that keeps the same approach as previously proposed (building
> Guix using multiple derivation, one for each group of modules: core,
> CLI, packages, etc.), but does not attempt to reload modules in the
> running Guile process, which proved to be too tricky.
>
> You can already test with:
>
> guix pull --branch=wip-pull-multiple-derivations
>
> Feedback welcome!
I think you forgot to push it or you are on a very slow connection :)
> This patch set actually addresses a bootstrapping issue: you need Guix
> to build Guix. So far ‘guix pull’ would sidestep the bootstrapping
> issue by building Guix with whatever is available in the currently
> deployed Guix; for instance, it would use the ‘guile’, ‘guile-json’,
> etc. packages from the current Guix. The problem of that approach was
> that it’s stateful: the result depends on what you currently have.
> Sometimes what you have is too old, or lacks some package definition,
> and you can’t really go forward.
>
> The code in ‘wip-pull-multiple-derivations’ works like this:
>
> 1. Assume we have Guile and Guix already installed, but not
> necessarily the latest versions thereof.
>
> 2. Using the (guix …) modules that we have, build a program—a
> “trampoline”—that will use the modules of the target Guix (the
> commit we want to pull) to compute the derivation of that Guix.
>
> 3. Run that trampoline, which returns /gnu/store/…-guix.drv. The
> result should be the same regardless of the initial Guix because
> the trampoline uses exclusively modules from the target Guix.
>
> 4. ‘guix pull’ builds that derivation (actually the branch does not
> modify (guix scripts pull) at all; everything is in
> build-aux/build-self.scm.)
>
> In step #4, we should be able to get substitutes for at least some of
> the derivations.
>
> To build the trampoline in step #2, we first need to build a bunch of
> modules from the target Guix. Hopefully you don’t have to rebuild them
> at each pull, but it can take a minute or so, and you may not have
> substitutes for that (because this part is stateful.)
>
> In step #3, the trampoline has compiled code for the core modules, but
> it still has to interpret (gnu packages guile) and related modules,
> because these are not compiled. The program runs in ~40s on my laptop.
> To make it faster, we could reduce the closure of (gnu packages guile)¹,
> but that can be tricky. Or we could optimize Guile itself; I’m sure the
> compiler and/or interpreter could do better.
>
> In that branch, you can also run:
>
> make as-derivation
>
> and it will build Guix from $srcdir in the way described above.
>
> To summarize, performance is not great, but hopefully it’ll be slightly
> better than what we have now, especially with substitutes.
> Correctness/reproducibility are greatly improved.
>
> Ludo’.
>
> ¹ The closure of (gnu packages guile) contains python, haskell-check,
> music, and many other surprising things:
> <http://web.fdn.fr/~lcourtes/tmp/gnu-packages-guile.html>.
>
>
>
next prev parent reply other threads:[~2018-03-27 19:26 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-08 8:39 bug#27284: Memory leak in 'guix pull' or 'make' in guix source ng0
2017-06-08 15:02 ` ng0
2017-09-19 20:48 ` Ludovic Courtès
2017-09-20 2:40 ` Maxim Cournoyer
2017-09-20 11:42 ` Ludovic Courtès
2017-09-20 18:29 ` Maxim Cournoyer
2017-09-20 20:12 ` Ludovic Courtès
2017-09-21 14:43 ` Maxim Cournoyer
2017-09-23 18:14 ` Taylan Ulrich Bayırlı/Kammer
2017-09-24 19:44 ` Ludovic Courtès
2017-09-25 21:00 ` Maxim Cournoyer
2017-10-20 16:05 ` bug#27284: [PATCH 0/8] 'guix pull' creates several derivations Ludovic Courtès
2017-10-20 16:05 ` bug#27284: [PATCH 1/8] build: Factorize module compilation in (guix build compile) Ludovic Courtès
2017-10-22 21:22 ` Maxim Cournoyer
2017-10-23 1:50 ` Ludovic Courtès
2017-10-22 21:42 ` Eric Bavier
2017-10-23 2:51 ` Ludovic Courtès
2017-10-22 22:52 ` Eric Bavier
2017-10-23 5:10 ` Ludovic Courtès
2017-10-20 16:05 ` bug#27284: [PATCH 2/8] build: Honor make's '-j' flag Ludovic Courtès
2017-10-20 16:05 ` bug#27284: [PATCH 3/8] discovery: Move 'file-name->module-name' to (guix modules) Ludovic Courtès
2017-10-20 16:05 ` bug#27284: [PATCH 4/8] gexp: Add 'file-union' Ludovic Courtès
2017-10-20 16:05 ` bug#27284: [PATCH 5/8] gexp: Add 'directory-union' Ludovic Courtès
2017-10-20 16:05 ` bug#27284: [PATCH 6/8] union: Parametrize the symlink procedure Ludovic Courtès
2017-10-20 16:05 ` bug#27284: [PATCH 7/8] gexp: 'directory-union' has a #:quiet? parameter Ludovic Courtès
2017-10-20 16:05 ` bug#27284: [PATCH 8/8] DRAFT Add (guix self) and use it when pulling Ludovic Courtès
2017-10-22 20:05 ` Maxim Cournoyer
2017-10-27 23:49 ` Ludovic Courtès
2017-11-21 22:26 ` bug#27284: [PATCH 0/8] 'guix pull' creates several derivations Ludovic Courtès
2017-11-21 22:56 ` Ludovic Courtès
2017-12-11 10:52 ` bug#27284: [PATCH 0/4] 'guix pull' reloads modules, second try Ludovic Courtès
2017-12-11 10:52 ` bug#27284: [PATCH 1/4] gnu: Fix ambiguous 'zip' reference Ludovic Courtès
2017-12-11 10:52 ` bug#27284: [PATCH 2/4] gexp: 'computed-file' has a new #:guile parameter Ludovic Courtès
2017-12-11 10:52 ` bug#27284: [PATCH 3/4] Add (guix self) and use it when pulling Ludovic Courtès
2017-12-18 14:57 ` Ludovic Courtès
2018-03-27 9:14 ` bug#27284: ‘guix pull’ builds using multiple derivations Ludovic Courtès
2018-03-27 14:33 ` Ludovic Courtès
2018-03-27 19:25 ` Nils Gillmann [this message]
2018-03-27 20:51 ` Ludovic Courtès
2018-04-08 16:37 ` Ludovic Courtès
2018-04-09 19:53 ` Ricardo Wurmus
2018-04-10 21:53 ` bug#27284: ‘guix pull’ broken on Guile 2.0 Ludovic Courtès
2018-04-10 23:18 ` bug#31117: " Ludovic Courtès
2018-04-14 17:39 ` Ricardo Wurmus
2017-12-11 10:52 ` bug#27284: [PATCH 4/4] pull: Reload modules before doing anything else Ludovic Courtès
2017-11-12 21:33 ` bug#27284: Memory leak in 'guix pull' or 'make' in guix source Ludovic Courtès
2017-11-13 8:59 ` Ricardo Wurmus
2017-11-13 9:28 ` Ludovic Courtès
2017-11-13 14:09 ` Ricardo Wurmus
2017-11-13 17:48 ` Ricardo Wurmus
2017-11-14 7:54 ` Ludovic Courtès
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180327192518.rynrei7mr3qk3ocl@abyayala \
--to=ng0@n0.is \
--cc=27284@debbugs.gnu.org \
--cc=ludo@gnu.org \
--cc=maxim.cournoyer@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).