From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id gNTrKHJo3GZkbAAAe85BDQ:P1 (envelope-from ) for ; Sat, 07 Sep 2024 14:51:30 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id gNTrKHJo3GZkbAAAe85BDQ (envelope-from ) for ; Sat, 07 Sep 2024 16:51:30 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=Ja1AoxVr; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=SVrtnFf5; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1725720690; 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=owOc5w+RI8KxmIfYyVwhxfdKLJwVE7nsmJAd5hCqL7s=; b=H2JgoWrxTyPSB6YceTlw+qm2XRR3qA5k5LXM0XWRGR+H3ijisevfUi4u/hfyqXYv0m4+WX fhpapWcKsmAVCKXFr+/9Rh2t2GBhCrv4uXssFKKRkylfvoRvHeC1ENyfQBxaD6xNwau9qL ykKrEeh1/fxZkCezbBLGu219L0K5tsbIpz5th9KzJeCWI+e7MYN8iaJ8cGcvQqfE6AlE7q lL3QhA86f9mq7eiE/jlnGl5KNz5HXl68iWv3vOcQejo2gNE/mY00LoEYOvwf00lgblgy6L OCzak5V0eoKxywagXdEaSGAYc2UJs/U+f1ItkssduGVSgFUw+ATyTTGCuPo3oQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=Ja1AoxVr; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=SVrtnFf5; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1725720690; a=rsa-sha256; cv=none; b=Y2bW9wpNREc3SxjQjR7i2DZKVMUaeM4HPu6h3MvWhiZiYddMuIqvsvAXTY/8S0I+ERmfB3 5h7V1jfYXlPIc4ONUDsyZG0ygBVqRqvOvmtkl/aQXdIwNJrBnfigTAR1p9OEiYY5bH+mDd +U3qlm2wCfOC09li1z3w01twxuqwY+3BlqSDEpYewGp9KHtJCsVq3J6qodBdABPweBOiMe W7rSYaI2cwpYah3eH5Y9fZP4PY267VL9k3Ij0cPTO2d4E4vh8Y+zlBMitw3whiNUBFojPD ZmjdIkCVCrvf5Kj9Nz1IpjTI1Ywxpohf3CIbGBHXf2+7wNxMtdrp3JQgIhi20Q== 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 55E26C4C1 for ; Sat, 07 Sep 2024 16:51:30 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1smwmG-0007Xz-7h; Sat, 07 Sep 2024 10:51:04 -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 1smwmE-0007Xl-C0 for guix-patches@gnu.org; Sat, 07 Sep 2024 10:51:02 -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 1smwmE-0004Mi-1T for guix-patches@gnu.org; Sat, 07 Sep 2024 10:51:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=owOc5w+RI8KxmIfYyVwhxfdKLJwVE7nsmJAd5hCqL7s=; b=Ja1AoxVrR2i8xXAwLpnse8nzG7t6g8eSs2ZEt996sCfIny0ibd6M27INg7LRyzjipyWAUPmjkWpz29DlpIkym4Wka41wvbtSp2lEvWBs3S5BnDt8esj5ccUz6sv55b/xI8rHEzwbksS4ybX1bGtc/Ub9xM5iMXPfJZiNF97JFeBcdEfR77CiuOC/ALR7iPxTprRx75N9D1AqB8h8B1IiQZ3GXVcZj6E5MDH9Nzbn2K/A93OCwFOeY/+LRkrLrNcBdBW0egF3x1Mmc4RsOPyWEBEpsqKsL2Lfs9OeaEg9/RRHUYhrJQuq6RDVL1h/Tf4R+hgzGGErFM9Pbug9nrXYxA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1smwmE-0000xK-EW for guix-patches@gnu.org; Sat, 07 Sep 2024 10:51:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73073] [PATCH 0/6] Allow origin with label as inputs. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 07 Sep 2024 14:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73073 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Simon Tournier , Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: maxim.cournoyer@gmail.com, 73073@debbugs.gnu.org Received: via spool by 73073-submit@debbugs.gnu.org id=B73073.17257206483633 (code B ref 73073); Sat, 07 Sep 2024 14:51:02 +0000 Received: (at 73073) by debbugs.gnu.org; 7 Sep 2024 14:50:48 +0000 Received: from localhost ([127.0.0.1]:57186 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1smwm0-0000wW-1p for submit@debbugs.gnu.org; Sat, 07 Sep 2024 10:50:48 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:61951) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1smwly-0000wH-PE for 73073@debbugs.gnu.org; Sat, 07 Sep 2024 10:50:47 -0400 Received: by mail-ed1-f67.google.com with SMTP id 4fb4d7f45d1cf-5c3c3b63135so3217894a12.3 for <73073@debbugs.gnu.org>; Sat, 07 Sep 2024 07:50:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725720580; x=1726325380; darn=debbugs.gnu.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=owOc5w+RI8KxmIfYyVwhxfdKLJwVE7nsmJAd5hCqL7s=; b=SVrtnFf58h5HG/OyRDHl2n8O8ZP/SbWSyjrDteX2T6SKof1Dn09foF4hZsMb0nz7np b9cWRblB7cnCtxwlpLkFjQYMHgsAoOsMsreCzkchsoRiX+KXQiel6OfuSbwl5O16yRC7 /GQf3XI0Xyek8qVXP7hlE040mNvoohgvCJy3EW4B/RGarCRsYDR1nBTiubovdNc9uul2 P/GXgFTo4+ZJN5WJIhsgIURzKGfS8aOajiivmzHC1S7B/C4xJ162HLjN/NPotG3L6PMG /qj8KzrKj9YfSR4V/Ne496NWu1sCrXZnAx0E4Bwmh7j7HCwGLx7mHp/gPy6/2fydCGrl MRJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725720580; x=1726325380; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=owOc5w+RI8KxmIfYyVwhxfdKLJwVE7nsmJAd5hCqL7s=; b=AXA0lEhfE5900rolZn+aZ+XYzd+dJKPj/Be98IjKE4RoXhGI5AvRn1Cv4MOccf3zHt /RZ3DpE58i5N4YgbeMJI8jAo7EYY/Vz2bfafzQsqABvYZHHGvG7bLTbcoW9AOrYLqMsw Tyc4FFkMeeOCERLQOzdsuuVJ/nLQMpJGbljTq1yiL9mV1UX2AcVDIf2TRyscRBAHL1de Jh2HkqkNOCYwnyTaSGzb40g5MZEF2gnq9Ru4Bp9TPVEDftFmHxxfAHnqzs6j8/fUXng/ JSex38XaBNs1uCoSKC40kDZ6/e07F0HD2+0X07aYiP+/I73qW4Rwat062m0AV1X/3Sor FVxA== X-Forwarded-Encrypted: i=1; AJvYcCV1rDrepMXrofrveFuYQrFfu22LL/Jl+2NxwpvAhMQYUoSetGd9z3Fcvnospp++KXY23mknCw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YxJBb6DJ6+JEBihBHxNyEwK4mohAoNsWVkr7UEX0gK/ElBAKsCp 6PEIkGFqYW5b7eM0f/WzVXIa74kJw9+CWC1a/9f15KFEh2OWCj05 X-Google-Smtp-Source: AGHT+IEw2/F2cRpS19C9VxKVJhyrs71aBniHhRlrjQOoT7NgNlOX6rtzZf5Cm+VzSefRkTLdPm3geg== X-Received: by 2002:a05:6402:4586:b0:5c0:8c5a:f4f3 with SMTP id 4fb4d7f45d1cf-5c3dc7bd56amr3856134a12.26.1725720579451; Sat, 07 Sep 2024 07:49:39 -0700 (PDT) Received: from lumine.fritz.box (85-127-20-124.dsl.dynamic.surfer.at. [85.127.20.124]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c3ebd5217asm748263a12.45.2024.09.07.07.49.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Sep 2024 07:49:38 -0700 (PDT) Message-ID: From: Liliana Marie Prikler Date: Sat, 07 Sep 2024 16:49:36 +0200 In-Reply-To: <875xr7r38x.fsf@gmail.com> References: <87o750wj6n.fsf@gnu.org> <875xr7r38x.fsf@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 MIME-Version: 1.0 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -4.02 X-Migadu-Queue-Id: 55E26C4C1 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -4.02 X-TUID: /bp3Oj7d7kRK Hi Simon, since you pointed me here, I will chime in a little :) Am Samstag, dem 07.09.2024 um 15:40 +0200 schrieb Simon Tournier: > Hi Ludo, >=20 > On Fri, 06 Sep 2024 at 23:45, Ludovic Court=C3=A8s wrote: >=20 > > This is one reason why I=E2=80=99d rather avoid the change you=E2=80=99= re > > suggesting. > > But more importantly: I think we should avoid polymorphic lists for > > clarity (the principle is followed in most of the code), and > > reintroducing labels would be a step backwards. >=20 > This is inaccurate: inputs are already polymorphic lists.=C2=A0 For > example, >=20 > =C2=A0=C2=A0=C2=A0 (native-inputs (list desktop-file-utils ;for update-de= sktop- > database > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ge= ttext-minimal > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 `(= ,glib "bin") > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 it= stool > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 pk= g-config > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 py= thon)) >=20 > And =E2=80=9Cbin=E2=80=9D is a label, AFAIU.=C2=A0 That=E2=80=99s said=E2= =80=A6 Not in the sense that you are addressing inputs with it, no. "bin" is an output selector (output "label" if you will) =E2=80=93 its purpose it to choose an output that isn't "out". > > To be clear, I understand the current situation is not perfect, but > > I would rather look for solutions that do not involve undoing > > what=E2=80=99s taken this long to do. >=20 > =E2=80=A6I agree: my aim is not to revive the =E2=80=9Cold style=E2=80=9D= .=C2=A0 Aside, from my > perspective, the main issue with the =E2=80=9Cold style=E2=80=9D is not t= he labels > but instead it=E2=80=99s the redundancy. >=20 > In other words, labels are not the evil since they are still used for > dealing with =E2=80=9Coutputs=E2=80=9D. >=20 > Anyway, let avoid the Walder=E2=80=99s law trap [1]. ;-) >=20 > So let do not rely on explicit labels. But you are adding explicit labels here. A solution that doesn't would be much preferred. > > The main issue we want to address here is origins being hidden from > > =E2=80=98package-direct-sources=E2=80=99, right? >=20 > Yes=E2=80=A6=C2=A0 And also I think that=E2=80=99s a bad pattern to not h= ave all =E2=80=9Cinputs=E2=80=9C > in the same place. From my point of view, the current situation > defeats my understanding of declarative programming. I agree with you that inputs outside of inputs should be avoided, but I disagree with your point on declarative programming. Packages, even written in that style, are still declarative. > > diff --git a/guix/packages.scm b/guix/packages.scm > > index f373136d22..8b08f0d379 100644 > > --- a/guix/packages.scm > > +++ b/guix/packages.scm > > @@ -676,6 +676,8 @@ (define (add-input-label input) > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 "_") > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ,obj > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ,@(if (string=3D= ? output "out") '() (list output))))) > > +=C2=A0=C2=A0=C2=A0 ((? origin? origin) > > +=C2=A0=C2=A0=C2=A0=C2=A0 (list (or (origin-actual-file-name origin) "_= ") origin)) > > =C2=A0=C2=A0=C2=A0=C2=A0 (x > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 `("_" ,x)))) > > =C2=A0 > >=20 > > =E2=80=A6 meaning we could write (this-package-input "git-manpages.tar.= gz") > > or similar.=C2=A0 (This particular change would need tweaks in a few > > packages such as =E2=80=98tzdata=E2=80=99 to avoid a full rebuild.) >=20 > This solution appears to me the best approach.=C2=A0 Somehow, it uses > =E2=80=99file-name=E2=80=99 as internal =E2=80=9Clabel=E2=80=9D.=C2=A0 Wh= en internal =E2=80=9Clabels=E2=80=9D will > completely removed, e.g., using package name or else, we will adapt. >=20 > Well, =E2=80=99origin-actual-file-name=E2=80=99 returns for example > "libgd-2.0.4-checkout", i.e. the version would be required when > calling =E2=80=99this-package-input=E2=80=99.=C2=A0 Therefore, it would m= ean something > like: >=20 > =C2=A0=C2=A0=C2=A0 #$(this-package-native-input (git-file-name "libgd" ve= rsion)) >=20 > This appears to me a good solution. It doesn't to me. What do you do if the libgd version changes? To arrive at a proper label, you would have to strip the versioning and packaging metadata =E2=80=93 otherwise you're left with a situation, where = you can't replace the package by tweaking inputs anyway. > However, how is it possible to avoid a full rebuild because =E2=80=99tzda= ta=E2=80=99 > or else?=C2=A0 It means the package definition cannot be modified, right? > Therefore, the only way would to special case =E2=80=99maybe-add-input- > labels=E2=80=99, e.g., >=20 > --8<---------------cut here---------------start------------->8--- > @@ -441,6 +441,9 @@ (define (maybe-add-input-labels inputs) > =C2=A0=C2=A0 "Add labels to INPUTS unless it already has them." > =C2=A0=C2=A0 (cond ((null? inputs) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 inputs) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ((and (pair? (car inputs)) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 (origin? (cdar inputs)) ) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 inputs) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ((and (pair? (car inputs= )) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 (string? (caar inputs))) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 inputs) > --8<---------------cut here---------------end--------------->8--- >=20 > Would it be ok performance-wise?=C2=A0 Or what could the another option? I don't think this does what you think it does. It returns inputs as-is if the tail of the first input is an origin=E2=80= =A6 which I don't think would be the case even if we do implement your v1. Cheers