From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id mLOyGnJA3WNbyAAAbAwnHQ (envelope-from ) for ; Fri, 03 Feb 2023 18:12:18 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id OMuHGnJA3WOrPQEAauVa8A (envelope-from ) for ; Fri, 03 Feb 2023 18:12:18 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 30E203DB98 for ; Fri, 3 Feb 2023 18:12:18 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNzbN-0004rH-Pz; Fri, 03 Feb 2023 12:11:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pNzbL-0004ql-VR for guix-devel@gnu.org; Fri, 03 Feb 2023 12:11:51 -0500 Received: from lepiller.eu ([89.234.186.109]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pNzbJ-0002F3-Jr for guix-devel@gnu.org; Fri, 03 Feb 2023 12:11:51 -0500 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 81542da8 for ; Fri, 3 Feb 2023 17:11:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:subject:message-id:mime-version:content-type :content-transfer-encoding; s=dkim; bh=4yYFpVu7Rqh3gbKLbqivvM+g8 UpN7QMmYlPz+Br6k08=; b=MNQQKzY6WK5F+JOhnVBf+8CGT0O/TzXEzq5LWai5z 3clorUeBpba2GaeFn4RKHz2kBx31TN18fbbtuUi0HHtMeojLfook3MBTY4p5SoEb dJDnx9zTsN+Mh0xndK3+TUyom9nRqoLGpJb9hkoB0s/mwuDiZtIO5Ej7ju2CIun4 5nScfELYgZYVnMVJHi5w81E42NAYe+py2YmQD7G8tIcMdV9eaG2MEMR7PnWJX+UX HLm6YYk0M7t1GnRrnn8EZheejJJAxN6EWoWmH3AZPQ+mL8xHlNoEY1NIoyHe76R6 CAmy55NgUUkTM8XIzBINTXxlVM42Q8gYUtCh1XM9wlmtg== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 277118b6 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Fri, 3 Feb 2023 17:11:42 +0000 (UTC) Date: Fri, 3 Feb 2023 18:11:26 +0100 From: Julien Lepiller To: guix-devel@gnu.org Subject: Reducing useless module imports Message-ID: <20230203181126.5ee4003c@tachikoma.lepiller.eu> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=89.234.186.109; envelope-from=julien@lepiller.eu; helo=lepiller.eu X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1675444338; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=4yYFpVu7Rqh3gbKLbqivvM+g8UpN7QMmYlPz+Br6k08=; b=SbeMVzLtM2ZUo44pI1ttvz8Y4NK15ilkOu2Ni8MgZn9NJX7GefPZhyBMgktBAp0p2cpL/J w/ycfmPH/+Yl/5fNHWHGRXl32lJMPm9FEHlTuTkvJ1r1NgtKHLw2a8pKUgqwJenvhDh35J Mtf30+RZZFIWkR9TdmZeBwYQu5bLqEIeSaIx3HLvpF/Ebv1oGTTc2vSBlWRWsMGj7fB1rl n0QfRLGEkJDVrhQ0ITEWZ3RD8u+DpwBq20cBc0AUGOrg5AplXA1SvlKZyBLd4c8KJNRqE+ NdsCe5XbYyPCAs7j3AfBZ/Bgo2sSIVmO92vPyVqomohGvLw2p4y+hhSUVU33gg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=lepiller.eu header.s=dkim header.b=MNQQKzY6; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=lepiller.eu ARC-Seal: i=1; s=key1; d=yhetil.org; t=1675444338; a=rsa-sha256; cv=none; b=WLwMBDki+YdsEO3vZymj2P7pxR5P90hU1iP7WiASJ7ml2gSEMvusYuIMfakWKmXzZlFoZ8 KZvPANENHQQp/wBkAXz7AsWJBm/6rKQdXeZfd86oI4PIl7v+wY80S0ON/B7puUZ6V/27FW c4aYYkVOK/QJh5r/uKlO1QC4cbxw5OO0Dj3Dlonmc+3ELRfjnXBoXlJb/y1BMDuVQ/Rbbc VjpfE1tBxQw3aW9G7TfxI3bY6Yzm6od4WJQF3e0iUGXMyu3a/4aceq9m1t5MfOmGmiHXlZ myHGEBffOROyb2lxW5QEDaF3p2dOnYTaMbyD4yImIXEZpqajjBXlcq+3rsgcZA== X-Migadu-Spam-Score: -4.08 X-Spam-Score: -4.08 X-Migadu-Queue-Id: 30E203DB98 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=lepiller.eu header.s=dkim header.b=MNQQKzY6; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=lepiller.eu X-Migadu-Scanner: scn1.migadu.com X-TUID: Sbwfpimhk/ce Hi Guix! during the Guix Days, we talked about reducing module imports. First, let's note there's an empty module (gnu packages key-mon). Then, we looked at build systems modules that are imported, but for which the build system is never used: ``` for f in *.scm; do systems=$(grep '#:use-module (guix build-system' $f | sed 's|^.*use-module (guix build-system \([^)]*\).*|\1|'); for s in $systems; do if grep "${s}-build-system" $f >/dev/null; then :; else echo $s is not used in $f; fi; done; done ``` For instance, (gnu packages minetest) imports (guix build-system minetest) but never uses the minetest-build-system. (gnu packages abiword) uses (guix build-system gnu) but does not use the gnu-build-system. Many modules seem to use a lot of imports that are actually useless, for instance (gnu packages heads) imports 20 package modules, but only uses 4 of them. Removing these module imports would help a lot with reducing the number of loops. If anyone wants to volunteer a lint checker for that, raise hands :D