GNU bug report logs -
#45409
[PATCH 0/3] Move some (guix scripts substitute) code to two new modules
Previous Next
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
Message #20 received at 45409 <at> debbugs.gnu.org (full text, mbox):
Hi,
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.
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’.
This bug report was last modified 4 years and 135 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.