unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Chris Marusich <cmmarusich@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: 'guix build' and garbage collection
Date: Mon, 03 Apr 2017 10:53:08 +0200	[thread overview]
Message-ID: <87shlprhxn.fsf@gnu.org> (raw)
In-Reply-To: <871stakn8v.fsf@gmail.com> (Chris Marusich's message of "Sun, 02 Apr 2017 23:40:16 -0700")

Hi Chris,

Chris Marusich <cmmarusich@gmail.com> skribis:

> My understanding is that Nix builds derivations in a temporary
> directory.  My understanding is that eventually, we copy the results of
> the build into the final, content-addressed store path.  Since we don't
> know the final, content-addressed store path until after we calculate
> the hash of the output, how do we prevent that final store path from
> being garbage collected while the build process is running?  Do we use
> addTempRoot to add the final, content-addressed store path as a
> temporary root, too?  I looked in the code but couldn't figure this out.

Store items are not content-addressed, except for fixed-output
derivations and things added with ‘add-to-store’ and
‘add-text-to-store’.

Leaving these two special cases aside, store file names are computed as
a function of the build inputs of a derivation.  In Eelco Dolstra’s
thesis, both models are described: the “extensional model” (the one Nix
and Guix use) and the “intensional model” (content-addressability, which
has never been deployed, and which is challenging in many ways.)

HTH!

Ludo’.

  reply	other threads:[~2017-04-03  8:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-02  1:06 'guix build' and garbage collection Chris Marusich
2017-04-02  9:30 ` Ludovic Courtès
2017-04-03  6:40   ` Chris Marusich
2017-04-03  8:53     ` Ludovic Courtès [this message]
2017-04-03 16:29       ` Chris Marusich
2017-04-04 12:13         ` Ludovic Courtès
2017-04-07  3:47           ` Chris Marusich
2017-04-07 19:53             ` 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=87shlprhxn.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=cmmarusich@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 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).