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 oMbXID5PNGWlNgEAG6o9tA:P1 (envelope-from ) for ; Sun, 22 Oct 2023 00:22:54 +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 oMbXID5PNGWlNgEAG6o9tA (envelope-from ) for ; Sun, 22 Oct 2023 00:22:54 +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 84958469FC for ; Sun, 22 Oct 2023 00:22:53 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tilde.club header.s=mail header.b=RMdsTQ0N; 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=fail reason="SPF not aligned (relaxed)" header.from=tilde.club (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1697926974; 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: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=jI0CCkNn2YkyMb5NWnpaZGtIjO0meQOaFNqXVpcPPYY=; b=M6i9sqD9jLGr3lhmD7nqGTqXi02xTbVo7QoovulKK+fIRagp0xvoUVcdhfyjjWuTmxgk10 HnuAeFjXbQYY1z//KY+drwd+GbochwngEJ7AIujeiGEtOJt8BO0Sg4EhITPaApPmcJhKo/ Y5SnAgQ6U1qMRNlzN/hQFlKxsFRhgzpR0lgjT4ghYUq7wV9Ntri6GhXPDLlBtHmxqcnWXE aCmiF0cpugqnkzTGssVgAYCp8+Gd+Sr0iathjlN0EmvHf5jT718wRFeN+omh/7tRLWqAlx xGXweRiv2FJAycFx3fHrNoHloIxGL3P3nNIy1Xr1noV26lw+EI89OcXuuSBaQA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1697926974; a=rsa-sha256; cv=none; b=tQMrg9zt3CmcqhKEcnwrvW5zbOoJRtAm4kjnoo+W0RvYhWnCT5YWkMkcJzoJ6bqm8wJWEA Yy1GkoAGw4z7/v0vyI9ufl4RK3j6W8T50fve6b74yBXt2+g38suTu18wLEgDihKvbdG+Jy HzsL2t0LFN2MO8doddntuM/pp2sV4dELStRUWjoZCrEzL2ftKI1wMF84UjluzziZ6tvLx+ FDVlgDlJo4xJZrGcykYEjXQuydKxmLUR4fde9+2VR1KAbF8GB2ciRAkrAez+hX1wrCOwdg Fb7OaOkq1g/aiGOsViqXPmsnQ7//dhX7jaZdMq23Ni4nudSeRs/7JSezCTPq4A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tilde.club header.s=mail header.b=RMdsTQ0N; 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=fail reason="SPF not aligned (relaxed)" header.from=tilde.club (policy=none) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1quKMe-0004ct-Ec; Sat, 21 Oct 2023 18:22:36 -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 1quKMc-0004VK-6k for bug-guix@gnu.org; Sat, 21 Oct 2023 18:22:34 -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 1quKMb-0000eQ-UG for bug-guix@gnu.org; Sat, 21 Oct 2023 18:22:33 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1quKN3-0001Dz-SE for bug-guix@gnu.org; Sat, 21 Oct 2023 18:23:01 -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: Sat, 21 Oct 2023 22:23:01 +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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Ulf Herrman , 65665@debbugs.gnu.org Received: via spool by 65665-submit@debbugs.gnu.org id=B65665.16979269804700 (code B ref 65665); Sat, 21 Oct 2023 22:23:01 +0000 Received: (at 65665) by debbugs.gnu.org; 21 Oct 2023 22:23:00 +0000 Received: from localhost ([127.0.0.1]:45211 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1quKN2-0001Dj-DZ for submit@debbugs.gnu.org; Sat, 21 Oct 2023 18:23:00 -0400 Received: from tilde.club ([142.44.150.184]:42476 ident=postfix) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1quKN0-0001DZ-1g for 65665@debbugs.gnu.org; Sat, 21 Oct 2023 18:22:59 -0400 Received: by tilde.club (Postfix, from userid 5378) id 0C2122202A78C; Sat, 21 Oct 2023 22:22:29 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 tilde.club 0C2122202A78C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tilde.club; s=mail; t=1697926949; bh=6Q8HA8Wx5YGg0cCQNm7UZUl75eAErrZG49vYkQMVSpw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=RMdsTQ0NaE5uYk9MH3rHWn9tAOgnU9MEsL17uH24uOkX/APzv8Up7GnX4/kR/Nq8z 8PkpMWEhNFL5zH7+F4pRArDIoF0r37sx5kkO2wjkjMor+f6D6UcztmPkN/jsWqfpf7 zv4vUjJQxn8wKYqp/cUfI3Sg1zjpdSkK+u6Klbbw= From: Ulf Herrman In-Reply-To: <87wmvgoxn7.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Sat, 21 Oct 2023 16:31:08 +0200") References: <87h6ofufy5.fsf@tilde.club> <87msxmqwng.fsf@tilde.club> <871qe0lytk.fsf_-_@gnu.org> <87wmvrdxnf.fsf@tilde.club> <87y1g5fd1e.fsf@gnu.org> <87o7h0e4us.fsf@tilde.club> <87wmvgoxn7.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Date: Sat, 21 Oct 2023 17:22:10 -0500 Message-ID: <8734y3r4z1.fsf@tilde.club> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" 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: 0.77 X-Migadu-Queue-Id: 84958469FC X-Migadu-Scanner: mx0.migadu.com X-Migadu-Spam-Score: 0.77 X-TUID: tVuEbooKzW/K --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > I don=E2=80=99t know, should we start by having a proper bug report for t= his and > study how this happen? Does that mean opening a new issue, or what? The bug you've described is the one this issue was initially opened for. > Again I=E2=80=99m sorry if I=E2=80=99m slow to understand, but I=E2=80=99= d like to make sure we > have a good understanding of the problem before we start discussing > solutions. Okay, I suppose I should have given a concrete example of the behavior. The qgit example can fill that role: $ cat $(./pre-inst-env guix build qgit -n --derivations --no-grafts --with-= latest=3Dqtbase) The way this happens is that qt-build-system's bag-builder (e.g. qt-build, qt-cross-build)) introduces a reference to the qtbase from its #:qtbase argument into the gexp it creates a derivation from, completely independently of any inputs. qgit doesn't explicitly specify #:qtbase, and qt-build-system's 'lower' procedure doesn't add one, so the default value for that keyword argument, (default-qtbase), is used in qt-build. This default value can only be overridden by explicitly passing #:qtbase as a package or bag argument. This requirement doesn't map well to a generic package transformation interface at all - it requires that every transformer (e.g. package-mapping) check if the package it's transforming is using qt-build-system, and if so explicitly supply a #:qtbase that is the result of transforming the original implicit or explicit value, after somehow figuring out what that may be (currently only doable by manually reading guix/build-system/qt.scm). This behavior is also currently exhibited by all build systems' handling of #:guile. Here's a concrete example of that, taken from another mailing I sent to this issue (https://issues.guix.gnu.org/65665#15): =2D-------------------------------- (use-modules (guix packages) (guix profiles) (gnu packages base)) (define guile-named-lyle (package (inherit (default-guile)) (name "lyle"))) ;; contrived example that only replaces hello's immediate dependencies (define hello-transformer (package-mapping (lambda (p0) (if (eq? p0 (default-guile)) guile-named-lyle p0)) (lambda (p) (not (eq? p hello))) #:deep? #t)) (define hello-with-lyle (hello-transformer hello)) (packages->manifest (list hello hello-with-lyle)) ;; $ guix build --derivations --manifest=3DTHISFILE ;; Expectation: build for hello-with-lyle is done with guile-named-lyle. ;; Reality: derivation for hello-with-lyle is the same as hello. =2D-------------------------------- Hopefully that makes it clear why this is happening. As for solutions, some options that come to mind: 1. guile and qtbase, instead of being passed to bag builders as a separate argument, are passed as a bag input that is looked up by magic input label, e.g. "guile-for-build", "qtbase-for-build", etc. Seems fragile, but requires no changes to package-mapping, etc. 2. Modify the build systems so that these kinds of implicit arguments that are packages are always present in bags, and the defaults for those keyword arguments in e.g. qt-build are never used. This is the approach I've taken with https://issues.guix.gnu.org/issue/65665/attachment/4/0/3. This still requires that bag arguments that are packages are transformed in addition to inputs. I hope that counts as a proper bug report. =2D Ulf --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHIBAEBCAAyFiEEn6BUn0yca1D9JsMa1lV76sJM9mgFAmU0TxIUHHN0cmluZXNz QHRpbGRlLmNsdWIACgkQ1lV76sJM9mhmMAwAgJPzlVRPk86Mtw7un5F/MjUXNlzX oWPXFqUYNymnt3soKeCKhO70JOu/zRWwnve23I7Ghjbt/6fLhMPT6mT1yvZPJ6Og sCqFhxQc3iSh7brDFIC91MEVUugcb8lY2jTOIUObeRfVRmzp78cgCzPS1n1Lo9/5 MUtcCHXoq5myYdO71nC9dF4XgAi2kTx5tBlFHcDpNlgmAHkDNyjAZ2riwxYU/yIt wEkpUp1RZMnPnWuBBsZDpRcZadkIp5px/crPbuGYzeuTMU/VTRuaW59HIZb9Wccj w7WToQxHRqV9kdPnZvFUGC1DiDuUI5opIunndKzNPc3ep4XGsUMXn3dUwEyVODYt m5F5qcQWwKCS9Le7TbdHm3FBN/AL5tIXYThYJ+D0ZcGBTCyH7LGEOgTEAQqOxt7u XXwPHHtCv2BhV8RYy3DooHBguHIxcuhSQQ+7ZnqZwuvJ86I7YyXsEjp4c08mKtwM Ah0VyLKGrs6H7QIyyAByqp3CFFNhEmYX79bG =z2HY -----END PGP SIGNATURE----- --=-=-=--