[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/08: environment: Really auto-load (guix scripts pack).
From: |
guix-commits |
Subject: |
01/08: environment: Really auto-load (guix scripts pack). |
Date: |
Mon, 17 Apr 2023 17:52:21 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 9fad6067d914066e3b80bc9da6a2cb8bb060b96d
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Mon Apr 17 14:32:24 2023 +0200
environment: Really auto-load (guix scripts pack).
Fixes a performance regression on cache hits introduced in
b31ea797edb4f6e8c14e8fe790da1319607c5cb1, whereby (guix scripts pack)
would be loaded eagerly during startup, leading hundreds of (gnu
packages *) modules to be loaded.
Fixes <https://issues.guix.gnu.org/62899>.
* guix/scripts/environment.scm: Autoload (gnu build install).
(%options): Add indirection when calling 'symlink-spec-option-parser' so
that (guix scripts pack) is auto-loaded only when needed.
---
guix/scripts/environment.scm | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index ebfc05731c..8c0da9694e 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -38,7 +38,7 @@
#:autoload (guix scripts pack) (symlink-spec-option-parser)
#:use-module (guix transformations)
#:autoload (ice-9 ftw) (scandir)
- #:use-module (gnu build install)
+ #:autoload (gnu build install) (evaluate-populate-directive)
#:autoload (gnu build linux-container) (call-with-container %namespaces
user-namespace-supported?
unprivileged-user-namespace-supported?
@@ -271,7 +271,11 @@ use '--preserve' instead~%"))
(alist-cons 'file-system-mapping
(specification->file-system-mapping arg #f)
result)))
- (option '(#\S "symlink") #t #f symlink-spec-option-parser)
+ (option '(#\S "symlink") #t #f
+ (lambda (opt name arg result)
+ ;; Delay call to avoid auto-loading (guix scripts pack)
+ ;; when unnecessary.
+ (symlink-spec-option-parser opt name arg result)))
(option '(#\r "root") #t #f
(lambda (opt name arg result)
(alist-cons 'gc-root arg result)))
- branch master updated (63500cbbee -> 84bd7cf918), guix-commits, 2023/04/17
- 03/08: substitute: Download nar from another server upon ETIMEDOUT., guix-commits, 2023/04/17
- 02/08: services: agetty: 'term-console' succeeds by default., guix-commits, 2023/04/17
- 01/08: environment: Really auto-load (guix scripts pack).,
guix-commits <=
- 05/08: gnu: Add kitsas., guix-commits, 2023/04/17
- 04/08: ssh: Silence remote daemon messages when sending store items., guix-commits, 2023/04/17
- 07/08: gnu: usbutils: Use G-Expressions., guix-commits, 2023/04/17
- 08/08: gnu: remmina: Update to 1.4.29., guix-commits, 2023/04/17
- 06/08: gnu: usbutils: Make package description different from synopsis., guix-commits, 2023/04/17