From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 2Ie8EKxv9GDVdwEAgWs5BA (envelope-from ) for ; Sun, 18 Jul 2021 20:15:08 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id sP5nDKxv9GAnegAAbx9fmQ (envelope-from ) for ; Sun, 18 Jul 2021 18:15:08 +0000 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 C2B52513A for ; Sun, 18 Jul 2021 20:15:07 +0200 (CEST) Received: from localhost ([::1]:49028 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m5BJi-0005tT-Sf for larch@yhetil.org; Sun, 18 Jul 2021 14:15:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5BJe-0005tB-52 for guix-patches@gnu.org; Sun, 18 Jul 2021 14:15:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45638) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m5BJd-0000WA-Qp for guix-patches@gnu.org; Sun, 18 Jul 2021 14:15:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m5BJd-00007w-NG for guix-patches@gnu.org; Sun, 18 Jul 2021 14:15:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49597] [PATCH core-updates 00/15] Ajust packages to label-less input style Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 18 Jul 2021 18:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49597 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= , 49597@debbugs.gnu.org Received: via spool by 49597-submit@debbugs.gnu.org id=B49597.1626632048413 (code B ref 49597); Sun, 18 Jul 2021 18:15:01 +0000 Received: (at 49597) by debbugs.gnu.org; 18 Jul 2021 18:14:08 +0000 Received: from localhost ([127.0.0.1]:57184 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5BIl-00006a-SU for submit@debbugs.gnu.org; Sun, 18 Jul 2021 14:14:08 -0400 Received: from newton.telenet-ops.be ([195.130.132.45]:52386) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5BIj-00006R-Vq for 49597@debbugs.gnu.org; Sun, 18 Jul 2021 14:14:06 -0400 Received: from albert.telenet-ops.be (albert.telenet-ops.be [IPv6:2a02:1800:110:4::f00:1a]) by newton.telenet-ops.be (Postfix) with ESMTPS id 4GSTmV2mXDzMqg51 for <49597@debbugs.gnu.org>; Sun, 18 Jul 2021 17:44:10 +0200 (CEST) Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by albert.telenet-ops.be with bizsmtp id Wfk72500F0mfAB406fk8UL; Sun, 18 Jul 2021 17:44:08 +0200 Message-ID: From: Maxime Devos Date: Sun, 18 Jul 2021 17:44:01 +0200 In-Reply-To: <20210716155009.32118-1-ludo@gnu.org> References: <20210716155009.32118-1-ludo@gnu.org> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-AjCUnq8XiBfRo4Da4mlg" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626623048; bh=2XMvDRgCIakBj5LQL1t76BGmvaVaKFvqyBBhVGa1AU8=; h=Subject:From:To:Date:In-Reply-To:References; b=Vnp6/PX0MCjVOryNduxRx6pnEJml7gODVszWzYkUm/i6cO6b4W5CHPQlIOfLju05A u26foW8sfeDMB/KueT3cXvrRk5+eIdgGDnxkkpozDUJhFpdshlSP6Qazf848p61Dw1 S7Sr5qzCnCrLH3QlmBnt81sC+wVVngF0Fa5uFfr38UVrSmUnInlfu49akC2g/V6yWl 42WivSqUs0duOfhbRdJbI+ovi7fqpkNN2nkAZSvo4EPE3rex0Ry16YCGBB5gFV5uJ/ U/aV1k2Lj0FwHydJ2EzoWSEA7jUbpXs6znRrex1yQRHx1dofiyc8tt16XyY4Jvj/8x IPpGOy5SuD4CQ== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1626632107; 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:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=2XMvDRgCIakBj5LQL1t76BGmvaVaKFvqyBBhVGa1AU8=; b=u16FhvIP6sLpclsEZHkj0eDmbdJyqvHdLFqnZPfZMfVPfgk9Kp4ANKxATay5sTZTTi/oli Ey3H8vzQwKKcQ3Z9YcxePvJdEW2tPrzBOMRoMO/y4sLo+1GtkUIxMId9q8SiXtzjdMCrK3 f8P1W5sFKKGQcEMkxrIn/PKCZE1MjR3eCcOFrwBqa6+HR9nQZyd0hMcMaV3jzh/mMkGzPW 2S/jniZl/rZdeckoPXEAP4esfQXQP0yS2+ymUCDhpQzmUphsPJFumUi9y5/Q7jidCnD6tt WSxwdXFJNVixQ3sx6od/xwTMjx0itL04Fnvk8Jo0mObCAIjV7Ui2XyNxd7W/bg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1626632107; a=rsa-sha256; cv=none; b=DBRCVZeat+ZFALEETEWX9DZaoIa2aisNi+XA6NHiaWQjH7zov2tMLumiXnqyTGbP1AWNmS mtZ1mniQbmow3sTjxi2YV7JybbvdzACZd8xBOjLV4juGfTEnPsHhdiD4qpvPf7ZDZhujNV /a2hGyDwTy9ZWaKoe3n3Pb8C6zrV6zqiSOCsvPV442PlqxKUvLsmLPRq7Y8zod/rdGnu3f WUqkKS1WOVH4ydCNoUbchUgcdKku/ADu2JhGZ/WDl+UAQJzS7+/DKtAa2/ym4JmQZMWFFP 4NIK+byUCl6Ol17taopJX9XuUcUMj2pqv8IeIDlrh7XtbaoVt0ACGV+eb9XFyw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b="Vnp6/PX0"; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -3.41 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b="Vnp6/PX0"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: C2B52513A X-Spam-Score: -3.41 X-Migadu-Scanner: scn0.migadu.com X-TUID: 9JYNwpkzqH5p --=-AjCUnq8XiBfRo4Da4mlg Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Ludovic Court=C3=A8s schreef op vr 16-07-2021 om 17:50 [+0200]: > The rest is about removing reliance on input labels in build-side > code, primarily by changing: >=20 > (string-append (assoc-ref inputs "LABEL") "FILE") >=20 > to one of: >=20 > (search-input-file inputs "FILE") > (search-input-directory inputs "FILE") >=20 > This change will help if we eventually remove input labels entirely > from the API (remember that input labels are now unnecessary in > package definitions but they=E2=80=99re still returned by =E2=80=98packag= e-inputs=E2=80=99 > and similar procedures). >=20 > The idea is that code should not rely on package names when looking > for files as this would prevent things such as > =E2=80=98--with-inputs=3Dopenmpi=3Dmpich=E2=80=99 since the label in the = original package > would be =E2=80=9Copenmpi=E2=80=9D whereas it=E2=80=99d be =E2=80=9Cmpich= =E2=80=9D in the transformed package. > In this case (a kind of =E2=80=9Cvirtual dependencies=E2=80=9D), a better= idiom is: >=20 > (search-input-file inputs "lib/libmpi.so") >=20 > as this explicitly accommodates any implementation of that library. I would have expected that --with-inputs=3Dx=3Dy would turn the following: (package [...] (inputs `(("x" ,x)))) into: (package [...] (inputs `(("x" ,y)))) i.e., keep the label intact, but change the package value. If "with-inputs" functioned like that, then "search-input-file" wouldn't be necessary in this case. Thus, the input label would be by default the package name of the default package in 'inputs' or 'native-inputs', and if a input is replaced, then the package name of the original package is still used as label, but with the new package as value. (This might or might not currently be the case, I dunno) So, interpreting =E2=80=98The idea is that code should not rely on _package names_ when look= ing ...=E2=80=99 as =E2=80=98The idea is that code should not rely on _labels_ when looking = ...=E2=80=99, I don't agree, as labels (shouldn't) spontanuously change even when using --with-inputs, so I consider them perfectly fine to use when it's convenien= t. In the example you gave, both search-input-file and the original 'string-ap= pend' and 'assoc-ref' look convenient to me, though the latter more so than the o= ther, and a third variant could be #$(file-append (this-package-native-input "openmpi") "/lib/libmpi.so") which avoids 'string-append' and 'assoc-ref'. (I prefer explicitely writing in the package definition in which input a fi= le will be found, as a kind of documentation, though in this case it probably doesn't really matter.) > I initially made the =E2=80=98search-input-file=E2=80=99 changes by grepp= ing for > =E2=80=9C(string-append (search-input inputs=E2=80=9D, replacing everythi= ng in wgrep > mode. I then reviewed changes one by one (though without rebuilding > everything) and committed them in chunks of similar changes for > easier review/bisecting. >=20 > I=E2=80=99d like to push this to core-updates soonish. >=20 > Feedback welcome! An idea behind this series of patch series seems to be to eliminate input labels entirely. Is that true / false? A benefit of having procedures like 'modify-inputs' instead of having random code assume package inputs are alists with a certain structure, is that this opens some opportunities to experiment with the nature of inputs. More specifically, take 'propagated-inputs'. Guile dependencies of guile libraries usually have to be added to 'propagated-inputs', even if the library package can also be used as a program. If the user only wants to use it as a program, then the propagation isn't necessary. So introducing some kind of 'context-dependent propagation' might be interesting, to reduce propagation conflicts. Greetings, Maxime. --=-AjCUnq8XiBfRo4Da4mlg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYPRMQxccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7k3MAQDMelXs/ujVzLvovjnA/MVNW7xK 7wuU9tYxWEK4CO5RKAEAk+wFlKAVS2opWvdL9QjKnubCLrp5665JVLlKZfCF+gk= =lwoG -----END PGP SIGNATURE----- --=-AjCUnq8XiBfRo4Da4mlg--