all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Caleb Ristvedt <caleb.ristvedt@cune.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] Prototype register-path
Date: Mon, 05 Jun 2017 22:34:34 +0200	[thread overview]
Message-ID: <87poei9ns5.fsf@gnu.org> (raw)
In-Reply-To: <87a85m96dg.fsf@cune.org> (Caleb Ristvedt's message of "Mon, 05 Jun 2017 03:38:19 -0500")

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

Hi reepca!

I gave this patch set a try and looked at the code, and it looks very
good to me!

“make check TESTS=tests/store.scm” passes now with the fixes you posted
today (‘getenv’ & co.)

Like you say, what’s missing from ‘register-path’ now is a timestamp
reset phase (‘reset-timestamps’ in (gnu build install) should cover
that), and a deduplication phase (which you’ll have to implement).  That
would be a good next step IMO.

For deduplication, you already know the (guix hash) API that will allow
you to do that I guess.  The “deduplication database” is simply the
/gnu/store/.links directory.  Each entry there is a hard link to a file;
the name of the entry is the hex representation of the sha256 hash of
that file.  So when inserting a file in the store, all you need is to
look up its hash in /gnu/store/.links and hard-link from there.  See
what I mean?

Some minor suggestions about the code:

  • Please add a copyright line for yourself in files you modify, and
    add the usual GPLv3+ header in new files.  :-)

  • When you add new ‘with-something’ macros, you can tell Emacs (if
    that’s what you use) to ident them like the other ‘with-’ forms by
    modifying .dir-locals.el; there are several examples of that there.

  • I think ‘register-path’ doesn’t have to explicitly do a bunch of
    ‘getenv’ calls.  Instead it should use the variables defined in
    (guix config).  For instance ‘%store-directory’ and
    ‘%state-directory’ are already defined using ‘getenv’.  There’s
    currently nothing for NIX_DB_DIR but you could define
    ‘%store-database-directory’ similarly.

  • It would probably make sense to use the (guix store …) name space
    for modules that implement the store.  So we could have (guix store
    database) for the subset of (guix sql) that deals with
    /var/guix/db/db.sqlite, (guix store deduplication), and so on.

  • You get bonus points if you can squash “fixup” commits with the
    commit you’re conceptually amending.  :-)  Having a single patch
    that implements something makes it easier for others to review.  If
    you’re not familiar with ‘git rebase -i’ & co., that’s OK though,
    don’t bother.

  • Extra bonus points if you follow our commit log conventions as
    discussed at
    <https://www.gnu.org/software/guix/manual/html_node/Submitting-Patches.html>.
    :-)

What about pushing your changes to a WIP branch on Savannah or
elsewhere?  (If you have an account on Savannah we can give you access.)

Thank you, and thumbs up for the quality work so far!

Ludo’.

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

  reply	other threads:[~2017-06-05 20:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-03  8:47 [PATCH] Prototype register-path Caleb Ristvedt
2017-06-05  8:38 ` Caleb Ristvedt
2017-06-05 20:34   ` Ludovic Courtès [this message]
2017-06-06  8:59     ` Caleb Ristvedt
2017-06-08 16:59       ` Ludovic Courtès
  -- strict thread matches above, loose matches on Subject: below --
2017-06-12  5:14 Caleb Ristvedt
2017-06-17 23:05 ` Ludovic Courtès
2017-06-12  5:45 Caleb Ristvedt
2017-06-18  9:22 Caleb Ristvedt
2017-06-18 23:34 ` Chris Marusich
2017-06-19 11:47   ` Ludovic Courtès
2017-06-19 11:56 ` 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87poei9ns5.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=caleb.ristvedt@cune.org \
    --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 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.