From 2f2b9bda937ef2f14903df15e14652e3ef722845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 22 Dec 2025 16:23:42 +0100 Subject: [PATCH] git-authenticate, inferior: Autoload Git modules. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The primary motivation is that, since (guix git-authenticate) is part of the (guix describe) closure and might thus end up on the build side, autoloading allows us to not add a ‘with-extensions’ stanza for Guile-Git to every gexp that pulls in (guix describe). This situation happens with (guix platform) in the following commit. * guix/git-authenticate.scm: Explicitly autoload (git …) modules and (guix git). * guix/inferior.scm: Autoload (guix git). Change-Id: Ie26f302cd88603d2d787048213864013bfff572f Signed-off-by: Ludovic Courtès --- guix/git-authenticate.scm | 25 ++++++++++++++++++++----- guix/inferior.scm | 2 +- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/guix/git-authenticate.scm b/guix/git-authenticate.scm index ccd3e657405..c20c2aae27a 100644 --- a/guix/git-authenticate.scm +++ b/guix/git-authenticate.scm @@ -17,14 +17,29 @@ ;;; along with GNU Guix. If not, see . (define-module (guix git-authenticate) - #:use-module (git) + #:autoload (git oid) (oid->string + string->oid) + #:autoload (git blob) (blob-lookup blob-content) + #:autoload (git branch) (branch-lookup BRANCH-ALL) + #:autoload (git commit) (commit-lookup + commit-parents + commit-id + commit-tree + commit-extract-signature) + #:autoload (git errors) (GIT_ENOTFOUND) + #:autoload (git reference) (reference-target) + #:autoload (git repository) (repository-directory repository-head) + #:autoload (git structs) (git-error-code) + #:autoload (git tree) (tree-entry-bypath + tree-list + tree-entry-id + tree-entry-name) #:autoload (gcrypt hash) (sha256) #:use-module (guix base16) #:autoload (guix base64) (base64-encode) - #:use-module ((guix git) - #:select (commit-difference - commit-descendant? - false-if-git-not-found)) + #:autoload (guix git) (commit-difference + commit-descendant? + false-if-git-not-found) #:use-module (guix i18n) #:use-module ((guix diagnostics) #:select (formatted-message)) #:use-module (guix openpgp) diff --git a/guix/inferior.scm b/guix/inferior.scm index ddea46ba2fe..76c2a767c67 100644 --- a/guix/inferior.scm +++ b/guix/inferior.scm @@ -40,7 +40,7 @@ #:use-module (guix search-paths) #:use-module (guix profiles) #:use-module (guix channels) - #:use-module ((guix git) #:select (update-cached-checkout commit-id?)) + #:autoload (guix git) (update-cached-checkout commit-id?) #:use-module (guix monads) #:use-module (guix store) #:use-module (guix derivations)