all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Richard Sent <richard@freakingpenguin.com>
To: guix-devel@gnu.org, "Ludovic Courtès" <ludo@gnu.org>,
	"Edouard Klein" <edou@rdklein.fr>
Subject: Re: Guix pull: avoiding "Computing Guix derivation"
Date: Tue, 14 May 2024 10:02:45 -0400	[thread overview]
Message-ID: <526C4150-7013-4680-B5CA-5EBEDF6E5E02@freakingpenguin.com> (raw)
In-Reply-To: <87r0e43do0.fsf@gnu.org>

>> - Why is this step not substitutable ? The inputs are known, a hash can
>> be derived, a substitute server could be queried for an output of that
>> hash ? What am I missing ? Does the guix derivation not end up in the
>> store ? What makes it so special that it can't be served by a substitute
>> server ?
>
>It’s not substitutable because it’s not a derivation.  It’s not a
>derivation because it needs to access the store to “compute the Guix
>derivation”.

I see that build in build-self.scm isn't a derivation, but most of the time spent in build is, to my knowledge, while the daemon is building the build-program derivation. build-program in build-self.scm returns a gexp->script file-like object and I see various /gnu/store/*-compute-guix-derivation.drv files in my store.

Ergo, if more of the inputs to build-program were locked, the compute-guix-derivation output should be substitutable. To my knowledge the problem largely lies in that the modules imported in build-self.scm are from the current Guix, which vary wildly between machines and is rarely, if ever, substitutable. In theory if those modules were pinned to particular versions, the bulk of the time spent in build would be removed.

Obviously there are challenges with this approach. For one, if we were to use the "guix" package to run build and generate compute-guix-derivation.drv, what would we do if a user on Guix A wanted to upgrade/downgrade to B, but the Guix package was changed in-between?

I think the various problems are solvable, perhaps by making the solution opt-in. e.g. $ guix pull --quick, which attempts to build channels using an infrequently updated Guix/Guix-subset to more regularly match an existing compute-guix-derivation in a substitute server's store.

Sorry if the formatting on this is off, sent from my phone.


  reply	other threads:[~2024-05-14 14:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-13 15:04 Guix pull: avoiding "Computing Guix derivation" Edouard Klein
2024-05-13 15:45 ` Ryan Sundberg
2024-05-14 14:32   ` Edouard Klein
2024-06-24 15:25   ` Edouard Klein
2024-05-13 19:28 ` Simon Tournier
2024-05-13 21:11   ` Richard Sent
2024-05-13 23:30     ` Simon Tournier
2024-05-14  0:52       ` Richard Sent
2024-05-14  9:47         ` Simon Tournier
2024-05-14 14:40           ` Edouard Klein
2024-05-14 10:12 ` Ludovic Courtès
2024-05-14 14:02   ` Richard Sent [this message]
2024-05-14 17:29     ` Richard Sent
2024-05-14 14:48   ` Edouard Klein
2024-05-15  8:38     ` Josselin Poiret
2024-05-31 14:02       ` Edouard Klein

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=526C4150-7013-4680-B5CA-5EBEDF6E5E02@freakingpenguin.com \
    --to=richard@freakingpenguin.com \
    --cc=edou@rdklein.fr \
    --cc=guix-devel@gnu.org \
    --cc=ludo@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.