unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Chris Marusich <cmmarusich@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: 'guix build' and garbage collection
Date: Mon, 03 Apr 2017 09:29:52 -0700	[thread overview]
Message-ID: <87vaqlmp33.fsf@gmail.com> (raw)
In-Reply-To: <87shlprhxn.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Mon, 03 Apr 2017 10:53:08 +0200")

[-- Attachment #1: Type: text/plain, Size: 2033 bytes --]

ludo@gnu.org (Ludovic Courtès) writes:

> 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’.

Oh!  This was my misunderstanding, then.  Thank you for clarifying it.

> 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.)

I had incorrectly assumed that we (and Nix) were using the intensional
model.  When I read Eelco's thesis, it sounded like the intensional
model was being actively developed and used (in prototype form) in
2006. The intensional model presented in his thesis seemed very well
thought out, and it seemed to bring many benefits over the extensional
model, so I'm surprised that we're still using the extensional model
today.

Do you know why the intensional model hasn't been deployed in the 11
years since the thesis was published?  To learn more, I can think of a
few places to look (Nix email lists, other Nix-related research papers),
but if you have specific recommendations, it would be helpful!

-- 
Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2017-04-03 16:30 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
2017-04-03 16:29       ` Chris Marusich [this message]
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=87vaqlmp33.fsf@gmail.com \
    --to=cmmarusich@gmail.com \
    --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 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).