guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#45409] [PATCH 3/3] guix: Split (guix substitute) from (guix scripts


From: Ludovic Courtès
Subject: [bug#45409] [PATCH 3/3] guix: Split (guix substitute) from (guix scripts substitute).
Date: Sun, 03 Jan 2021 16:08:34 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Hi,

Christopher Baines <mail@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.

It would still be nice to list the identifiers that were moved in the
commit log, it’s boring :-) but it can be helpful when browsing the
history.

As for the split, I wouldn’t put as much into (guix substitutes) (I’d
use “substitutes”, plural, for consistency with most other modules.)

As a rule of thumb, I would keep in (guix scripts substitute) anything
that’s very much biased towards a single short-lived process: connection
cache, host name resolution failure cache, etc.  These things are a bit
hacky and not designed for use as a library.  They’re also very much
policy rather than mechanism, and as such they don’t belong in a proper
library IMO.

> -(define* (http-multiple-get base-uri proc seed requests
> -                            #:key port (verify-certificate? #t)
> -                            (open-connection guix:open-connection-for-uri)
> -                            (keep-alive? #t)
> -                            (batch-size 1000))

How about moving this one to (guix http-client), as a separate patch?
I think it’s a better fit and could be useful elsewhere.

Thanks!

Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]