From patchwork Sat Sep 3 16:43:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: M X-Patchwork-Id: 42179 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2CC1D27BBEA; Sat, 3 Sep 2022 17:57:15 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 144A027BBE9 for ; Sat, 3 Sep 2022 17:57:13 +0100 (BST) Received: from localhost ([::1]:41848 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oUWSG-0006oK-7r for patchwork@mira.cbaines.net; Sat, 03 Sep 2022 12:57:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39644) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oUWR8-000647-G2 for guix-patches@gnu.org; Sat, 03 Sep 2022 12:56:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54180) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oUWR8-0004iw-8A for guix-patches@gnu.org; Sat, 03 Sep 2022 12:56:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oUWR8-0004e0-3t for guix-patches@gnu.org; Sat, 03 Sep 2022 12:56:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54539] [PATCH v2 01/30] gnu: package-management: Autoload unless used by Guix. References: <5a87d6f772ff7424cb6fccea7c45276bef7797aa.camel@telenet.be> In-Reply-To: <5a87d6f772ff7424cb6fccea7c45276bef7797aa.camel@telenet.be> Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 03 Sep 2022 16:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54539 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54539@debbugs.gnu.org Cc: Maxime Devos Received: via spool by 54539-submit@debbugs.gnu.org id=B54539.166222411317628 (code B ref 54539); Sat, 03 Sep 2022 16:56:02 +0000 Received: (at 54539) by debbugs.gnu.org; 3 Sep 2022 16:55:13 +0000 Received: from localhost ([127.0.0.1]:42834 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oUWQK-0004a9-7z for submit@debbugs.gnu.org; Sat, 03 Sep 2022 12:55:12 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:40190) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oUWF6-0004B2-VD for 54539@debbugs.gnu.org; Sat, 03 Sep 2022 12:43:38 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:5dba:d409:33f7:a16]) by xavier.telenet-ops.be with bizsmtp id FUjb2800820ykKC01Ujb9w; Sat, 03 Sep 2022 18:43:35 +0200 From: Maxime Devos Date: Sat, 3 Sep 2022 18:43:03 +0200 Message-Id: <20220903164332.6848-1-maximedevos@telenet.be> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1662223415; bh=Cil7e2/E4cV1utEYpdJnqNuMVU5NveLen7gSE5Mw6Pk=; h=From:To:Cc:Subject:Date; b=WO/3Cfq7Zfl1TluNDCDh3cYphNeHtmp3w8xKBthUHsqb4Eav2w/m6m5r3HPiJ7SeR GZtVkC9EfXZRWhVidr6yQWf+jW5y0gaGE6HyHzFzMhQpHC2MDJr8ObrNL+Zu4dxdEu Q1nANJP5l5/tV0kVhFeeRXE9ZGYHP0iQmDOpSo7hHwrV1Vc+d+V0kr0kpw4/8lJL13 A77XqeZKvVBiy4o4+zMBrPHuur+Z6KQPy5pvOv6bWLKy/X7I63UC5/xT76vJOaSctS AdJ5MsO/Te49uZgcZpEVK+wCTR7kv1YLDSzFWhaKEAhQqo1V4f4LMhPh6sp1qJ7R6B 8HoigFGzXp35w== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Goal: reduce the amount of modules that "compute-guix-derivation" needs to load (reducing memory usage). As a side benefit, the start-up latency of various "guix build ..." commands should decrease -- at worst, it should remain as the same as before. Delete #:use-module, check that "./pre-inst-env guix build -d guix" still works. If so, turn the use-module into an #:autoload. If not, reinstate the #:use-module. Some imported modules are loaded anyway by dependencies and as such could theoretically be left intact for the purposes of , but that's more developer work for no apparent benefit. Sometimes, the module wasn't used at all. In that case, it is removed. On its own, this commit doesn't accomplish much, so a report will be given in the latest commit of the series. --- gnu/packages/package-management.scm | 155 +++++++++++++++------------- 1 file changed, 86 insertions(+), 69 deletions(-) base-commit: 4555fb7dfa08f956bbfc8179772c7288c34b1f97 prerequisite-patch-id: 7626f1464f4926416fb13daf3d846176aa93f51b prerequisite-patch-id: 445c6f624e99627959f2e54a6ee97337c44d9ea6 prerequisite-patch-id: 7a16c500faec9d58700a2b50b26bded079e9c3ac prerequisite-patch-id: f7d406c61e069c04c3b7da453192f51c04763db1 prerequisite-patch-id: 4674bf40052d97215f837c9dfd4e7e1ae999492d diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index 519924737c..1c7b90f8c4 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -40,76 +40,93 @@ (define-module (gnu packages package-management) #:use-module (gnu artwork) #:use-module (gnu packages) - #:use-module (gnu packages acl) - #:use-module (gnu packages attr) - #:use-module (gnu packages avahi) - #:use-module (gnu packages autotools) - #:use-module (gnu packages backup) - #:use-module (gnu packages base) - #:use-module (gnu packages bash) - #:use-module (gnu packages bdw-gc) - #:use-module (gnu packages bison) - #:use-module (gnu packages boost) + #:autoload (gnu packages attr) (attr) + #:autoload (gnu packages avahi) (avahi) + #:use-module (gnu packages autotools) ; required by "guix build -d guix" + #:use-module (gnu packages backup) ; required by "guix build -d guix" + #:use-module (gnu packages base) ; required by "guix build -d guix" + #:autoload (gnu packages bash) (bash-minimal) + #:autoload (gnu packages bdw-gc) (libgc) + #:autoload (gnu packages bison) (bison) + #:autoload (gnu packages boost) (boost) + ;; required by "guix build -d guix" #:use-module (gnu packages bootstrap) ;for 'bootstrap-guile-origin' - #:use-module (gnu packages build-tools) - #:use-module (gnu packages check) - #:use-module (gnu packages compression) - #:use-module (gnu packages cmake) - #:use-module (gnu packages cpio) - #:use-module (gnu packages crypto) - #:use-module (gnu packages curl) - #:use-module (gnu packages databases) - #:use-module (gnu packages dejagnu) - #:use-module (gnu packages dbm) - #:use-module (gnu packages docbook) - #:use-module (gnu packages file) - #:use-module (gnu packages flex) - #:use-module (gnu packages gcc) - #:use-module (gnu packages gettext) - #:use-module (gnu packages glib) - #:use-module (gnu packages gnome) - #:use-module (gnu packages gnupg) - #:use-module (gnu packages graphviz) - #:use-module (gnu packages gtk) - #:use-module (gnu packages guile) - #:use-module (gnu packages guile-xyz) - #:use-module (gnu packages hardware) - #:use-module (gnu packages hurd) - #:use-module (gnu packages imagemagick) - #:use-module (gnu packages less) - #:use-module (gnu packages libedit) - #:use-module (gnu packages linux) - #:use-module (gnu packages lisp) - #:use-module (gnu packages lua) - #:use-module (gnu packages man) - #:use-module (gnu packages markup) - #:use-module (gnu packages nettle) - #:use-module (gnu packages networking) - #:use-module (gnu packages ninja) - #:use-module (gnu packages nss) - #:use-module (gnu packages patchutils) - #:use-module (gnu packages perl) - #:use-module (gnu packages perl-check) - #:use-module (gnu packages pkg-config) - #:use-module (gnu packages popt) - #:use-module (gnu packages python) - #:use-module (gnu packages python-build) - #:use-module (gnu packages python-check) - #:use-module (gnu packages python-web) - #:use-module (gnu packages python-xyz) - #:use-module (gnu packages serialization) - #:use-module (gnu packages sqlite) - #:use-module (gnu packages ssh) - #:use-module (gnu packages tcl) - #:use-module (gnu packages texinfo) - #:use-module (gnu packages time) - #:use-module (gnu packages tls) - #:use-module (gnu packages vim) - #:use-module (gnu packages virtualization) - #:use-module (gnu packages web) - #:use-module (gnu packages xml) - #:use-module (gnu packages xorg) - #:use-module (gnu packages version-control) + #:autoload (gnu packages build-tools) (meson) + #:autoload (gnu packages check) + (googletest python-coverage python-freezegun python-mock python-pytest + python-pytest-cov python-pytest-mock python-pytest-timeout + python-parameterized python-pytest-xdist) + #:use-module (gnu packages compression) ; required by "guix build -d guix" + #:autoload (gnu packages cmake) (cmake) + #:autoload (gnu packages cpio) (cpio) + #:autoload (gnu packages crypto) (libsodium) + #:autoload (gnu packages curl) (curl) + #:autoload (gnu packages databases) (sqitch) + #:autoload (gnu packages dejagnu) (dejagnu) + #:autoload (gnu packages dbm) (bdb) + #:autoload (gnu packages docbook) (docbook-xml docbook-xsl) + #:autoload (gnu packages file) (file) + #:autoload (gnu packages flex) (flex) + #:use-module (gnu packages gettext) ; required by "guix build -d guix" + #:autoload (gnu packages glib) + (glib intltool gobject-introspection dbus appstream-glib xdg-dbus-proxy) + #:autoload (gnu packages gnome) + (vala libgsf libsoup-minimal-2 dconf json-glib glib-networking + gsettings-desktop-schemas) + #:use-module (gnu packages gnupg) ; required by "guix build -d guix" + #:use-module (gnu packages graphviz) ; required by "guix build -d guix" + #:autoload (gnu packages gtk) + (guile-rsvg guile-cairo gdk-pixbuf) + #:use-module (gnu packages guile) ; required by "guix build -d guix" + #:use-module (gnu packages guile-xyz) ; required by "guix build -d guix" + #:autoload (gnu packages hardware) (libcpuid) + #:use-module (gnu packages hurd) ; required by "guix build -d guix" + #:autoload (gnu packages imagemagick) (imagemagick) + #:autoload (gnu packages less) (less) + #:autoload (gnu packages libedit) (editline) + #:use-module (gnu packages linux) ; required by "guix build -d guix" + #:autoload (gnu packages lua) (lua) + #:use-module (gnu packages man) ; required by "guix build -d guix" + #:autoload (gnu packages markup) + (lowdown) + #:autoload (gnu packages networking) + (socat) + #:autoload (gnu packages ninja) + (ninja) + #:autoload (gnu packages nss) + (nspr nss) + #:autoload (gnu packages perl) + (perl perl-capture-tiny perl-io-stringy) + #:autoload (gnu packages perl-check) + (perl-test-simple perl-test-output) + #:use-module (gnu packages pkg-config) ; required by "guix build -d guix" + #:autoload (gnu packages popt) + (popt) + #:autoload (gnu packages python) + (python python-wrapper python-3) + #:autoload (gnu packages python-build) + (python-pyparsing) + #:autoload (gnu packages python-web) + (python-requests python-responses python-bottle python-urllib3 python-webtest) + #:autoload (gnu packages python-xyz) + (python-clyent python-nbformat python-pyyaml python-pillow python-six + python-tqdm python-cython python-cytoolz python-pycosat + python-colorama python-distro python-fasteners python-future + python-jinja2 python-node-semver python-patch-ng + python-pluginbase python-pygments python-pyjwt python-pyyaml-5 + jupyter python-ipython python-ipykernel) + #:autoload (gnu packages serialization) (python-ruamel.yaml) + #:use-module (gnu packages sqlite) ; required by "guix build -d guix" + #:use-module (gnu packages ssh) ; required by "guix build -d guix" + #:autoload (gnu packages tcl) (tcl) + #:autoload (gnu packages texinfo) (texinfo) + #:autoload (gnu packages time) (python-dateutil python-pytz) + #:use-module (gnu packages tls) ; required by "guix build -d guix" + #:autoload (gnu packages virtualization) (bubblewrap) + #:autoload (gnu packages web) (jq) + #:autoload (gnu packages xml) (libxml2 libxslt) + #:autoload (gnu packages xorg) (libxau) + #:autoload (gnu packages version-control) (git-minimal) #:autoload (guix build-system channel) (channel-build-system) #:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system gnu)