~ruther/guix-local

4fa29f3bed9b8e5f7a385e242491873c6ab66fa8 — Ludovic Courtès 3 months ago 4076de8
git-authenticate, inferior: Autoload Git modules.

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 <ludo@gnu.org>
Signed-off-by: Rutherther <rutherther@ditigal.xyz>
2 files changed, 21 insertions(+), 6 deletions(-)

M guix/git-authenticate.scm
M guix/inferior.scm
M guix/git-authenticate.scm => guix/git-authenticate.scm +20 -5
@@ 17,14 17,29 @@
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(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)

M guix/inferior.scm => guix/inferior.scm +1 -1
@@ 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)