[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Guix to participate in the Google Summer of Code
From: |
Ricardo Wurmus |
Subject: |
Re: Guix to participate in the Google Summer of Code |
Date: |
Wed, 21 Feb 2018 10:10:05 +0100 |
User-agent: |
mu4e 1.0; emacs 25.3.1 |
Hi Alex,
>> The reference scanner is already implemented in the form of grafts. The
>> code opens each file and searches efficiently for store references.
>>
> Does this mean we have procedure to do a single find-reference and the
> remaining work is to build a recursive find-reference?
The current way to obtain references is through the daemon. In (guix
store) there is a procedure “references” that is used whenever we want
to get a list of references for a store item. But how does the daemon
itself obtain those references in the first place?
“nix/libstore/references.cc” implements a reference scanner and it is
quite similar to how “replace-store-references” in (guix build graft)
works.
So a first step towards an implementation of the reference scanner would
be to liberate “replace-store-references” from its grafting context;
possibly turn it into a higher order function that finds references and
optionally invokes a function when a reference is found. Then it could
be used for grafting as well as for collecting references in the daemon.
But I would recommend to revive the work from the last GSoC first.
--
Ricardo
GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
https://elephly.net