From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id cM5/BRb18GS5rwAAG6o9tA:P1 (envelope-from ) for ; Thu, 31 Aug 2023 22:16:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id cM5/BRb18GS5rwAAG6o9tA (envelope-from ) for ; Thu, 31 Aug 2023 22:16:22 +0200 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 A4627644E2 for ; Thu, 31 Aug 2023 22:16:20 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tilde.club header.s=mail header.b="UGh/OkaC"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=tilde.club (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1693512981; 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:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=5gHJ7WBJuRrN9HYIxSf2DcHmjKiau1Z80lrhyZ8AyBI=; b=BZNf7P4LBJ4WuRlim48I2pbtjSP0JtDJxoleL0WbM7IrgY2d7BdQmvF2c5tIrxdNpEmqTK edUYH66XrDiH3MWeE3vpdRv0N3lqy20msb+Eei0+yBY1Y7GN3li7q64QlM0jpybeAq/ogP 3ovvVEfnpvwKGFvn0D8Favn2Bl6fe1KV+qjoznI3NvwLb13YGanNQqhietPBL8tkg67uDm B0SF47+eQlVsEg+9QhgK9XfamNAz68NimyyHHij3MHBPcStIvdo/vn+P4wbgVxXmkI9KhD 9rIn6K6b4ASQQ4tfzZVNe5VbUV9J1La2JEzgQ7q/RcjkDK7b2ZuAb4VxxgcZUg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tilde.club header.s=mail header.b="UGh/OkaC"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=tilde.club (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1693512981; a=rsa-sha256; cv=none; b=l0MJ4ZkSPxjrNM5kzDpHfWMTj64s5p4SFrpgBQEoaL7wQ/PORxInhtU7eS0pgbKRxzasEN bWn2xkXfU26k8ACUBrYGcylfEIUv1h4hcuefJ7Oaju4BGLwX6tZz4rNULAqCQoOqzW/zeg xUN4Fvl7tpeuNvGjql3WxZxt89q+M3nu9NlUzco6lJQr734W/Sgp6JsSubpM/4kfY7X4P1 8B88Wtwh/gjZSWl4ohPW/ORLyfsVAFd8D68QDCRom9ga7fjqTKrN4TvDY9sDKMiI41tdGb fOpxR7aHQzDOWlh90yCHJoSGXYBdLIR3yi0JDNFiPxXXbqoItiA/U2shvnmx7g== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qbo5C-0000eJ-7s; Thu, 31 Aug 2023 16:16:02 -0400 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 1qbo56-0000dr-PD for bug-guix@gnu.org; Thu, 31 Aug 2023 16:15:56 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qbo55-0007yt-77 for bug-guix@gnu.org; Thu, 31 Aug 2023 16:15:55 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qbo5C-0008Kb-FL for bug-guix@gnu.org; Thu, 31 Aug 2023 16:16:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#65665: package-mapping with #:deep? #t doesn't get all the implicit inputs Resent-From: Ulf Herrman Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 31 Aug 2023 20:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 65665 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 65665@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.169351294632000 (code B ref -1); Thu, 31 Aug 2023 20:16:02 +0000 Received: (at submit) by debbugs.gnu.org; 31 Aug 2023 20:15:46 +0000 Received: from localhost ([127.0.0.1]:59302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qbo4v-0008K3-Sz for submit@debbugs.gnu.org; Thu, 31 Aug 2023 16:15:46 -0400 Received: from lists.gnu.org ([2001:470:142::17]:37694) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qbo4u-0008Jr-Ha for submit@debbugs.gnu.org; Thu, 31 Aug 2023 16:15:45 -0400 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 1qbo4g-0000bv-Gh for bug-guix@gnu.org; Thu, 31 Aug 2023 16:15:30 -0400 Received: from tilde.club ([2607:5300:204:4340::114]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qbo4e-0007qZ-Bo for bug-guix@gnu.org; Thu, 31 Aug 2023 16:15:30 -0400 Received: by tilde.club (Postfix, from userid 5378) id 782AC2230E27B; Thu, 31 Aug 2023 20:15:25 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 tilde.club 782AC2230E27B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tilde.club; s=mail; t=1693512925; bh=dd38u7mL08PfsKke01w/EU/tIGYtgf9eg83p8YlRQAk=; h=From:To:Subject:Date:From; b=UGh/OkaCnXDAoADjrnWWRLljzApjQdQAKJP3tqkk0kF6wXCqm60KGetJt9UMDViz1 T7lGox8Jv2iLwksXxaEWiZwgARbCkb+mFicyJX+U2RS7eic3brAXbxKwLbXAOYZk/p piYZHroa3sldTj/pb5wuJMyWhbSVD7zIrInuk4AM= From: Ulf Herrman Date: Thu, 31 Aug 2023 15:14:58 -0500 Message-ID: <87h6ofufy5.fsf@tilde.club> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=2607:5300:204:4340::114; envelope-from=striness@tilde.club; helo=tilde.club 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: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: -7.23 X-Spam-Score: -7.23 X-Migadu-Queue-Id: A4627644E2 X-TUID: ys30a19GA4dU --=-=-= Content-Type: text/plain #:deep? #t currently works by interposing a dummy build system that lowers the package to a bag using the original build system, then applies the supplied transformation to all of the bag's inputs, then returns a new bag with the new inputs. The problem with this approach is that it doesn't affect the bag arguments. This means that packages passed in as arguments may still end up being used without being transformed. Worse still, packages *not* passed in as arguments may end up being used *unless one is explicitly passed in as an argument*, as is the case with qt-build-system's #:qtbase argument. In short, the current approach of having the build-system lower procedure leave the arguments mostly unchanged and letting the bag->derivation procedure (the "bag builder") fill in lots of defaults means that there are implicit inputs that cannot be touched at the package level without adding special logic for every single build system that does something like this. I propose that we have the build system lower procedure (that is, the one that converts from package to bag) completely fill in the argument list with all defaults, and we modify build-system-with-package-mapping to transform all arguments that look like a package or a list of packages (or maybe even a tree containing packages). Many large-scale package transformations have their purpose defeated if even a single package slips through and has to be built or downloaded separately (e.g. "I wanted to use a more minimal version of P, and now I have both the original version of P *and* a more minimal version of P *and* a duplicate copy of a large portion of the package graph..."). In fact, in some situations, this could cause exponential growth of the number of packages, e.g. a transformation is applied to qtbase and its dependencies, but not to the implicit version and its dependencies, so now all the dependencies of qtbase are duplicated, and if this happens again at a higher level with something that depends on a package with qt-build-system, now there are four duplicate subgraphs, and so on. What do you think? - Ulf --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHIBAEBCAAyFiEEn6BUn0yca1D9JsMa1lV76sJM9mgFAmTw9MkUHHN0cmluZXNz QHRpbGRlLmNsdWIACgkQ1lV76sJM9mhnnAwAmtKewwrTyG+f8sVRzZwHlipENflt rQZmeK7LmkD2I6F4IG8tay+ro/ylIX3dFs2FPUDkBqY1biewXXO3M7Po3/oIUY3b II16LQcp+FtJ8S8GZTHZnAdFgVoqVBiot5zftDCZCOQxZj/nbqFvT9EjAuUn6aCd eEod96rS+VeecDQEvHiCr/x5B9OcMkgulo4Y6uv9GtxeE1vBj1FxV6dGCj6epPWP Zj5+ED6P04T9vxXCmrlXMqtZBEZn7oQOauADribIQF/KAaqjuo+vjVyUorCCjkf9 wT+ukY2vikCd9esz+JJ7VXdRBS4q8RQ6kXIKdNvcJx2LdDgxPtF8+Iz2xls/J5sb OoJvzRsfS1CTR8ZoTi92Nx+5DKl2qF5cRGlM78Ckowf0rhEs7VNwKDcJSe8nyUfy LA43PXlB9J1NpzU9o9jAM6mM3rdxjGLf9lL0ARF9T3+XTu+XvVF4lHSdrQjsknMH oILI2U6DOHsdUbpWOMk9wWkk8NwzXDN2cNGd =3EXK -----END PGP SIGNATURE----- --=-=-=--