From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id oDfCJN39J2VVrwAA9RJhRA:P1 (envelope-from ) for ; Thu, 12 Oct 2023 16:08:29 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id oDfCJN39J2VVrwAA9RJhRA (envelope-from ) for ; Thu, 12 Oct 2023 16:08:29 +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 5157B596C1 for ; Thu, 12 Oct 2023 16:08:29 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=ibVUfJdz; 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=1697119709; 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=R0HQ8e9ZJEFkFWYJ2k7MtzgMuUfC2a615TAvrKdiSgk=; b=FOwtKyBXvLJbLtucJ7T2YWnQImC3kQcBhT4CGDTGY8HgfHeYNeqCmlPodMGLIJbfXAYQ+Z Q7Stv+KNbFmgFimmGoL+IsOh1jn1acurzEZ553iT2NHxdiqliNNGfHzEYj1RjHvF0khpPU qbsVTrN14BCU7MYoNj9cSJeBDKfjXYA8Do0ZIf4vf4eU3sm07keeh6hYP6x1iGtBmXtP+Z F4ZpLoS1pA+GRYaz0c/Ty+w6aKri2g+ZyLwP3MWe16EXm8B0xDXpI/aozTJIYRey+Cym39 VlQALyr0e3MraqF+TkcXQWVBgk2KbrVv71T4t/tUchIyx5DZPj0DxRpygxnAAw== 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=ibVUfJdz; 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-Seal: i=1; s=key1; d=yhetil.org; t=1697119709; a=rsa-sha256; cv=none; b=ThEYX0yVg0ObEC2+4jmiz9Pv9e3PiN964g6FH7uaf7C9zFaKiIwwu2VAsyb709zB8/xksf SJCtQK/Izcpq/NbZt5sHNCw8WMpx1cwcrj1/MjvnDyXU7DFO72E0Gcf0aL+yRPrB9p59Ia 4uUl+78qMB3Vq6iw1VKmpxh3VqTH/iygG5ow2vKbQW70HYz3PXsWoIusi2je4Gb1pcHLHu bMwRNZQAjDS8K6/15evjqu7pQiDCv80hgcz32lO5E5lX4jR1BXx+lw19ZVOWNR/+6Re9t/ vZ7kdk4nSfc9TmAW/tYdb2zQvtZ5AWbfQmbrLc7SDYAdvoiqN91MjvSHocjVkA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqwM6-0001FB-Oc; Thu, 12 Oct 2023 10:08: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 1qqwLk-0000SQ-Cy for bug-guix@gnu.org; Thu, 12 Oct 2023 10:07:40 -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 1qqwLk-0008JK-2Q for bug-guix@gnu.org; Thu, 12 Oct 2023 10:07:40 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qqwM6-0003kY-5B for bug-guix@gnu.org; Thu, 12 Oct 2023 10:08: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: Thu, 12 Oct 2023 14:08: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.169711966214382 (code B ref 65665); Thu, 12 Oct 2023 14:08:02 +0000 Received: (at 65665) by debbugs.gnu.org; 12 Oct 2023 14:07:42 +0000 Received: from localhost ([127.0.0.1]:43920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqwLl-0003jq-TD for submit@debbugs.gnu.org; Thu, 12 Oct 2023 10:07:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42256) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqwLj-0003jR-EB for 65665@debbugs.gnu.org; Thu, 12 Oct 2023 10:07:40 -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 1qqwLH-0008G4-GR; Thu, 12 Oct 2023 10:07:11 -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=R0HQ8e9ZJEFkFWYJ2k7MtzgMuUfC2a615TAvrKdiSgk=; b=ibVUfJdzNqAnfPDe6Taf /K5VpFwmJyLzTQkbJm4Q6uY2pOG+SZsqLakgsTYlC3MhEChtrV8yxIbiWuUJQZdb1T/naF83aklyx KjpH99VM6kBTiZmM05ZaUTwvM1MUhAl0E4DTensoDhGWy3A4zAZijeEGp3gKAQR2LMBDizVVygL11 D0TCFlPwUdl86+mT+LPmcKdP30LUgojd4MvST0rUFw3CtUdNq9tDpVisQpeBctoWdNQ6LVq4eoRYg zRcHctXGsV22FFXULyR+BuSDMr8ktzMqDxz5F/KtDWaVRXBYRYiLEWYhusf5+GOSKnOhWju9QGJmi EIzeJ8AXSQkYpQ==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <87msxmqwng.fsf@tilde.club> (Ulf Herrman's message of "Sat, 16 Sep 2023 04:45:23 -0500") References: <87h6ofufy5.fsf@tilde.club> <87msxmqwng.fsf@tilde.club> Date: Thu, 12 Oct 2023 16:06:47 +0200 Message-ID: <871qe0lytk.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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -6.87 X-Spam-Score: -6.87 X-Migadu-Queue-Id: 5157B596C1 X-Migadu-Scanner: mx2.migadu.com X-TUID: 7aOCjdnTp9x3 Ulf Herrman skribis: > -(define (build-system-with-package-mapping bs rewrite) > +(define (build-system-with-package-mapping bs rewrite-input rewrite-argu= ment) > "Return a variant of BS, a build system, that rewrites a bag's inputs = by > passing them through REWRITE, a procedure that takes an input tuplet and > returns a \"rewritten\" input tuplet." > @@ -1442,9 +1442,10 @@ (define (build-system-with-package-mapping bs rewr= ite) > (let ((lowered (apply lower args))) > (bag > (inherit lowered) > - (build-inputs (map rewrite (bag-build-inputs lowered))) > - (host-inputs (map rewrite (bag-host-inputs lowered))) > - (target-inputs (map rewrite (bag-target-inputs lowered)))))) > + (build-inputs (map rewrite-input (bag-build-inputs lowered))) > + (host-inputs (map rewrite-input (bag-host-inputs lowered))) > + (target-inputs (map rewrite-input (bag-target-inputs lowered))) > + (arguments (map rewrite-argument (bag-arguments lowered)))))) Aah, now I understand. :-) It=E2=80=99s indeed the case that arguments can capture references to packa= ges that won=E2=80=99t be caught by =E2=80=98package-mapping=E2=80=99. For ins= tance, if you write: (package =E2=80=A6 (arguments (list =E2=80=A6 #~(whatever #$coreutils)))) =E2=80=A6 then =E2=80=98coreutils=E2=80=99 here cannot be replaced. To address this, the recommendation is to always add dependencies to input fields and to use self-references within arguments. The example above should be written like this: (package =E2=80=A6 (arguments (list =E2=80=A6 #~(whatever #$(this-package-input "coreutils"))))) It=E2=80=99s just a recommendation and one can perfectly ignore it, and I suppose that was the impetus for this patch. This is one of the things discussed while designing this change: https://guix.gnu.org/en/blog/2021/the-big-change/ (search for =E2=80=9Cself-referential records=E2=80=9D) https://issues.guix.gnu.org/49169 My take was and still is that it=E2=80=99s an acceptable limitation. Packa= gers need to follow the guideline above if they want proper support for rewriting, =E2=80=98guix graph=E2=80=99, and other tools. WDYT? Thanks, Ludo=E2=80=99.