From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id gC+sA6exKmVx/AAAG6o9tA:P1 (envelope-from ) for ; Sat, 14 Oct 2023 17:20:07 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id gC+sA6exKmVx/AAAG6o9tA (envelope-from ) for ; Sat, 14 Oct 2023 17:20:07 +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 7E40D455AD for ; Sat, 14 Oct 2023 17:20:05 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=mg5ErfUs; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1697296806; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=WEbRZ1qTIDXXSIBF9lbT0HYqp7KnfwHa2IxGVmjDcPk=; b=BtRWKiCZMgTaMwj9FVU9fIpghJW7ibFPpuJsC5Opl/JLfPRsSCSFXmKU/nfk/AvfqKmYLc 8+cKHdDqey/wyKD2UzcKnUdoJjlon/TPMR/Tlbtju6wrMu0tA/IoyndOmnqP6uS5O9upGI RK1Fat6ttTuTEpEkmX0u9lX5v3wU0wjWLgESl+USiF3fddZeVUTKGipVCO7CeTTsCD/Fv0 PMJnCcNyz/QOOmu7iawQNwEzu9xsO4pPNq9BTXxxFx8eKD1IEXId2pxYvH6iGjAa/cpFT/ 8TPoftK4lTBD04+sncgh8Sk2toLzEwufdSwPTS1RNCCSb4fL9dbKJHUFUXvYQA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1697296806; a=rsa-sha256; cv=none; b=BwErUYmfNsWW2YRYIsOBpbeBUanddiZ0/emQzDosofTlZuMzoIlJxyIx5Jz/zh6wKWhkwd M9jGZB0tvU/sg2Y+jek9dHDlA70+cXQ37KnTMBjO7mG0kbNb7DwEbosIdJNghOQ5IOIOrM GbVFpvZNrkvn5OQA++VVxi0KcjY3RVKjxxk78WgBx6PExuOK4mPBt5d9kNUr3JwTpQfi21 XRHtRpSkCyLrwNI7iPLw6z1DFg28drNCgVRE/QChZ/McaDi0f3BfF8iA6mifLWV9EpQb/s eiup7Hq5G7ZRQLM1d6wkp6ScmlFxFTw9K9t/9SXQK0qTV4BhQp5MWXF0nC8+1w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=mg5ErfUs; 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"; dmarc=pass (policy=none) header.from=gnu.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qrgQX-0002Ix-Ch; Sat, 14 Oct 2023 11:19:41 -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 1qrgQV-0002Ih-GA for bug-guix@gnu.org; Sat, 14 Oct 2023 11:19:39 -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 1qrgQV-0002pl-8U for bug-guix@gnu.org; Sat, 14 Oct 2023 11:19:39 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qrgQs-0007Qc-FT for bug-guix@gnu.org; Sat, 14 Oct 2023 11:20: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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 14 Oct 2023 15:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65665 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ulf Herrman Cc: 65665@debbugs.gnu.org Received: via spool by 65665-submit@debbugs.gnu.org id=B65665.169729674228479 (code B ref 65665); Sat, 14 Oct 2023 15:20:02 +0000 Received: (at 65665) by debbugs.gnu.org; 14 Oct 2023 15:19:02 +0000 Received: from localhost ([127.0.0.1]:50171 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qrgPq-0007Ot-W5 for submit@debbugs.gnu.org; Sat, 14 Oct 2023 11:19:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46046) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qrgPl-0007Od-QY for 65665@debbugs.gnu.org; Sat, 14 Oct 2023 11:18:57 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qrgPI-0002lW-Ex; Sat, 14 Oct 2023 11:18:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=WEbRZ1qTIDXXSIBF9lbT0HYqp7KnfwHa2IxGVmjDcPk=; b=mg5ErfUsBYqof8ozFt9W ZNJ1lc9Rj2ricjJ35KnZQe4pk/COehD57vg9Zg62Tsiv+V2jeqgLkw7cjyAnWv+Msf9jFfnrtiUUG 5fOElbYRwKVORC62HylyDSm9b2T5MEpstS3znF/YD8yVxGpzBqGUoUEJzHFUWjUph/SAgibje+l7D mOC5x/fem1QBQU7iVyoVS3iyzi9oizCaKQyIIlDOdm3Lc8JaKrsbkMqa9R52ZBewemk1MJ7fjDG/R hnN9I86tZ5+WCEqfuAwBxqaV8JTCQznmJGU7uX4gLcwG1WfFjELmIBLXyEqWUcs5F8uTz6vSYeYzB 5jK/BfEmB1SWJw==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <87wmvrdxnf.fsf@tilde.club> (Ulf Herrman's message of "Thu, 12 Oct 2023 22:11:32 -0500") References: <87h6ofufy5.fsf@tilde.club> <87msxmqwng.fsf@tilde.club> <871qe0lytk.fsf_-_@gnu.org> <87wmvrdxnf.fsf@tilde.club> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Tridi 23 =?UTF-8?Q?Vend=C3=A9miaire?= an 232 de la =?UTF-8?Q?R=C3=A9volution,?= jour du Navet X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 14 Oct 2023 17:18:21 +0200 Message-ID: <87y1g5fd1e.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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-Spam-Score: -6.88 X-Migadu-Queue-Id: 7E40D455AD X-Migadu-Scanner: mx0.migadu.com X-Migadu-Spam-Score: -6.88 X-TUID: bSW0nL7wBfI9 Hello, Ulf Herrman skribis: > That and a growing thirst for a nuclear option for package rewriting > brought about by trying to debug deep transformations while > simultaneously experimenting with rewriting a manifest of around 270 > packages. On that topic of a catch-all option for rewriting: there=E2=80=99s an unused procedure called =E2=80=98map-derivation=E2=80=99, which performs rewriting= at the level of derivations. It=E2=80=99s harder to use, more expensive, but who knows, perhaps we=E2=80=99ll find a motivating use case=E2=80=A6 (Allowing for gr= aph rewriting has been a major goal for me since the beginning.) > There are really several distinct issues at play here: > 1. The case of #:qtbase and #:guile being invisible to package-mapping. > This is what I first noticed, and cannot be fixed without modifying > the build systems. This is what prompted looking for packages in > package and bag arguments, and recursing into lists therein (just in > case an argument took a list of packages). How are #:qtbase and #:guile invisible to package mapping? They appear in the bag inputs and thus are definitely visible to =E2=80=98package-mapping=E2=80=99, as a I showed with the CMake and Python = examples in this thread. For good measure :-) here=E2=80=99s an example with #:qtbase: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix build qgit -n substitute: updating substitutes from 'http://192.168.1.48:8123'... 100.0% substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% 0.4 MB would be downloaded: /gnu/store/7b20q17yg90b62404chgbnwgvd6ry1qf-qgit-2.10 $ ./pre-inst-env guix build qgit -n --with-latest=3Dqtbase following redirection to `https://mirrors.ocf.berkeley.edu/qt/official_rele= ases/qt/'... following redirection to `https://mirrors.ocf.berkeley.edu/qt/official_rele= ases/qt/6.6/'... guix build: warning: cannot authenticate source of 'qtbase', version 6.6.0 Starting download of /tmp/guix-file.CTehnY >From https://mirrors.ocf.berkeley.edu/qt/official_releases/qt/6.6/6.6.0/sub= modules/qtbase-everywhere-src-6.6.0.tar.xz... =E2=80=A6-src-6.6.0.tar.xz 46.1MiB = = 12.9MiB/s 00:04 =E2=96=95=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96= =88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88= =E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=8F 100.0% substitute: updating substitutes from 'http://192.168.1.48:8123'... 100.0% substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 10= 0.0% substitute: updating substitutes from 'https://guix.bordeaux.inria.fr'... 1= 00.0% The following derivations would be built: /gnu/store/paixxkdaakv55bffggxx4l9hiknl8i5r-qgit-2.10.drv /gnu/store/f9fdjk1g1s1aqmlmi4clla2kqns7283v-qtbase-6.6.0.drv 0.4 MB would be downloaded: /gnu/store/nl9dadzfmjm9wg7v3r31jkx773dl683x-module-import-compiled /gnu/store/6zryxmypw0wygayc9pvhyxkx47w0lyci-gperf-3.1 /gnu/store/a57n7wy8mdi7l52pr4zg07132blgj5xp-qgit-2.10-checkout --8<---------------cut here---------------end--------------->8--- Now, package transformation options are almost all implemented in terms of =E2=80=98package-input-rewriting/spec=E2=80=99, and I have to admit that= it=E2=80=99s much easier to use than =E2=80=98package-mapping=E2=80=99. The latter is low-le= vel and it can be a source of headaches. > 2. The (perceived) case of packages hiding inside arguments. In > hindsight, this was probably actually (3) causing this, though it's > hard to tell because I discovered it last. I attempted to resolve > this by recursing through s and s. Yeah. I think we have to understand that =E2=80=9Chiding=E2=80=9D is to so= me extent inevitable; is more concise than , which is more concise than . There are extra =E2=80=9Cinputs=E2=80=9D showing up whe= n we go from one abstraction to the one below. > 3. `this-package' referring to the inherited package in thunked fields, > rather than the package inheriting them. This is what prompted the > use of package-{inputs,arguments,etc}-with-package. Ah yes, I agree; I reported it here: https://issues.guix.gnu.org/50335 I think we can discuss it separately though, in that bug report probably. > (1) could be resolved in several ways. I'm partial to looking for > arguments whose values are packages and transforming them (when #:deep? > #t is specified), and adjusting the build systems to make that work > consistently, which is what I've done. > > (2) is probably not an issue, though it occurs to me that the technique > of recursively searching through arguments looking for packages could be > used to implement a sort of automated "transformability" check, which > could help a lot when trying to debug transformations. OK. > (3) is a major issue; the entire strategy of using `this-package-input' > to enable transformations breaks because of it. My fix works for me at > least, though it requires exposing additional low-level procedures and > transformation authors using them. I'll open another bug about it, as > requested. Yeah, understood. Thanks, Ludo=E2=80=99.