From 6a7c4636d4dec47eefa03c95da5a1315bd0e0413 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 6 Jan 2020 15:14:09 +0100 Subject: Adjust module autoloads. In Guile < 2.9.7, autoloading a module would give you access to all its bindings. In future versions, autoloading a module gives access only to the listed bindings, as per #:select (see ). This commit adjusts autoloads to the new semantics, allowing Guix to be built with Guile 2.9.7/2.9.8. * guix/build/download.scm : Remove call to 'module-autoload!'. (load-gnutls): New procedure. (tls-wrap): Call it. * guix/git.scm : Remove call to 'module-autoload!'. (load-git-submodules): New procedure. (update-submodules): Call it instead of 'resolve-interface'. * gnu/bootloader/grub.scm: Replace #:autoload with #:use-module. * gnu/packages.scm: Likewise. * gnu/packages/ssh.scm: Likewise. * gnu/packages/tex.scm: Likewise. * gnu/services/cuirass.scm: Likewise. * gnu/services/mcron.scm: Likewise. * guix/lint.scm: Augment list of bindings in #:autoload. * guix/scripts/build.scm: Likewise. * guix/scripts/gc.scm: Likewise. * guix/scripts/pack.scm: Likewise. * guix/scripts/publish.scm: Likewise. * guix/scripts/pull.scm: Likewise. * guix/utils.scm: Remove unnecessary #:autoload clauses; replace one of them with #:use-module. --- guix/build/download.scm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'guix/build/download.scm') diff --git a/guix/build/download.scm b/guix/build/download.scm index a7bb3b0d6e..641dacefa1 100644 --- a/guix/build/download.scm +++ b/guix/build/download.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès +;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès ;;; Copyright © 2015 Mark H Weaver ;;; Copyright © 2017 Tobias Geerinckx-Rice ;;; @@ -155,11 +155,11 @@ out if the connection could not be established in less than TIMEOUT seconds." ;; be bound if we need them, because (guix download) adds GnuTLS as an ;; input in that case. -;; XXX: Use this hack instead of #:autoload to avoid compilation errors. -;; See . -(module-autoload! (current-module) - '(gnutls) - '(make-session connection-end/client)) +(define (load-gnutls) + ;; XXX: Use this hack instead of #:autoload to avoid compilation errors. + ;; See . + (module-use! (current-module) (resolve-interface '(gnutls))) + (set! load-gnutls (const #t))) (define %x509-certificate-directory ;; The directory where X.509 authority PEM certificates are stored. @@ -245,6 +245,7 @@ host name without trailing dot." (format (current-error-port) "gnutls: [~a|~a] ~a" (getpid) level str)) + (load-gnutls) (let ((session (make-session connection-end/client)) (ca-certs (%x509-certificate-directory))) -- cgit v1.2.3