From 44de6d3990ee36c54fb0209bfae4fcdf6a392b15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 1 Apr 2024 15:55:05 +0200 Subject: guix: Delay loading of (gnutls). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (web …) modules pull in (gnutls) indirectly. Arrange to load them lazily, thereby reducing I/O and allocations when GnuTLS is not needed such as when running ‘guix describe’ or ‘guix shell’ on a cache hit. * guix/download.scm: Autoload (web uri). * guix/scripts/describe.scm: Likewise. * guix/store.scm: Likewise. (%default-substitute-urls): Remove ‘resolve-interface’ call and use https URLs unconditionally. Change-Id: Ide470c556a14866e8740966d25821df487a79859 --- guix/download.scm | 2 +- guix/scripts/describe.scm | 4 ++-- guix/store.scm | 16 +++++++++------- 3 files changed, 12 insertions(+), 10 deletions(-) (limited to 'guix') diff --git a/guix/download.scm b/guix/download.scm index 192c47f113..b251e1f6c0 100644 --- a/guix/download.scm +++ b/guix/download.scm @@ -32,7 +32,7 @@ #:use-module (guix monads) #:use-module (guix gexp) #:autoload (guix build utils) (call-with-temporary-output-file) - #:use-module (web uri) + #:autoload (web uri) (string->uri uri-scheme uri-path) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:export (%download-methods diff --git a/guix/scripts/describe.scm b/guix/scripts/describe.scm index 449ab4b252..70ae84e9f6 100644 --- a/guix/scripts/describe.scm +++ b/guix/scripts/describe.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2018, 2019, 2020, 2021, 2023 Ludovic Courtès +;;; Copyright © 2018, 2019, 2020, 2021, 2023, 2024 Ludovic Courtès ;;; Copyright © 2018 Oleg Pykhalov ;;; Copyright © 2020 Ekaitz Zarraga ;;; Copyright © 2021 Simon Tournier @@ -37,7 +37,7 @@ #:use-module (ice-9 match) #:use-module (ice-9 format) #:autoload (ice-9 pretty-print) (pretty-print) - #:use-module (web uri) + #:autoload (web uri) (string->uri uri-host) #:export (display-profile-content channel-commit-hyperlink diff --git a/guix/store.scm b/guix/store.scm index 1229198b09..5e398743cb 100644 --- a/guix/store.scm +++ b/guix/store.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012-2023 Ludovic Courtès +;;; Copyright © 2012-2024 Ludovic Courtès ;;; Copyright © 2018 Jan Nieuwenhuizen ;;; Copyright © 2019, 2020 Mathieu Othacehe ;;; Copyright © 2020 Florian Pelz @@ -49,7 +49,12 @@ #:use-module (ice-9 popen) #:autoload (ice-9 threads) (current-processor-count) #:use-module (ice-9 format) - #:use-module (web uri) + #:autoload (web uri) (uri? + string->uri + uri-scheme + uri-host + uri-port + uri-path) #:export (%daemon-socket-uri %gc-roots-directory %default-substitute-urls @@ -764,11 +769,8 @@ encoding conversion errors." ;; Default list of substituters. This is *not* the list baked in ;; 'guix-daemon', but it is used by 'guix-service-type' and and a couple of ;; clients ('guix build --log-file' uses it.) - (map (if (false-if-exception (resolve-interface '(gnutls))) - (cut string-append "https://" <>) - (cut string-append "http://" <>)) - '("bordeaux.guix.gnu.org" - "ci.guix.gnu.org"))) + '("https://bordeaux.guix.gnu.org" + "https://ci.guix.gnu.org")) (define (current-user-name) "Return the name of the calling user." -- cgit v1.2.3