GNU bug report logs - #45409
[PATCH 0/3] Move some (guix scripts substitute) code to two new modules

Previous Next

Package: guix-patches;

Reported by: Christopher Baines <mail <at> cbaines.net>

Date: Thu, 24 Dec 2020 17:19:02 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: Christopher Baines <mail <at> cbaines.net>
Cc: 45409 <at> debbugs.gnu.org
Subject: [bug#45409] [PATCH v3 3/3] guix: Split (guix substitutes) from (guix scripts substitute).
Date: Tue, 05 Jan 2021 23:03:55 +0100
Christopher Baines <mail <at> cbaines.net> skribis:

> This means there's a module for working with substitutes, rather than all the
> code sitting in the script. The need for this can be seen with the weather and
> challenge scripts, that now don't have to use code from the substitute script,
> but can instead use the substitute module.
>
> The separation here between the actual functionality of the substitute script
> and the underlying functionality used both there and elsewhere should make
> maintenance easier moving forward.
>
> This commit just moves code, none of the code should have been changed
> significantly.
>
> * guix/scripts/substitute.scm (%narinfo-cache-directory, %narinfo-ttl,
> %narinfo-negative-ttl, %narinfo-transient-error-ttl, %unreachable-hosts,
> %max-cached-connections): Move variables to (guix substitutes).
> (narinfo-cache-file, cached-narinfo, cache-narinfo!, narinfo-request, at-most,
> http-multiple-get, read-to-eof, narinfo-from-file,
> open-connection-for-uri/maybe, fetch-narinfos, lookup-narinfos,
> lookup-narinfos/diverse, open-connection-for-uri/cached,
> call-with-cached-connection): Move procedures to (guix substitutes).
> (with-cached-connection): Move syntax rule to (guix substitutes).
> * guix/substitutes.scm: New file.
> * Makefile.am (MODULES): Add it.
> * po/guix/POTFILES.in: Add 'guix/substitutes.scm'.

I’m reluctant starting this new module while it still contains
single-short-lived-process assumptions (connection caching & co.).

How about proceeding like this:

  1. Move ‘http-multiple-get’ to (guix http-client).

  2. Postpone the (guix substitute) bit to a separate patch series to
     leave us the time to polish things a bit and removes the
     single-process assumptions, or just move fewer things to (guix
     substitutes).

You could push (guix narinfo) in the meantime since I think that one is
almost ready.

How does that sound?  Am I being too cautious?

Thanks again! :-)

Ludo’.




This bug report was last modified 4 years and 133 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.