From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.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 kFEsFUJY3GbpqgAA62LTzQ:P1 (envelope-from ) for ; Sat, 07 Sep 2024 13:42:26 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id kFEsFUJY3GbpqgAA62LTzQ (envelope-from ) for ; Sat, 07 Sep 2024 15:42:26 +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=dFpqqzfH; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=k5Bn0CrA; 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=1725716546; 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=Kqxg3rLvtYkk+muk3QOkf5RNs9UC6BofQlBZf3J9x80=; b=I46DfC0uBEGeS+HgbprxS0dflvkIyvLYq5OLKzrCUjQ9FFNHGhe5LFBHVT2Z/3cOxVoIhH mNB+nhJ+Y7SrjQc9QnGbwUIwF2BpgE/FHDvibsgyuKJ+gQXRBugGDFiU8arzOEVAu4lji4 KciTobCnwTNSmJnrU9Kn0NQKXDXf29YjdB69HiEZzVIKpCMb23I4qfU4G9cxKp5w1vkxMK 1Q4dcdZQ9Wx3NUsZFe65tkKVnJI95bEznlm8iIo5OL3GlODT81APj40ybQGMUFzLJokf4m hCirJ/UOmZS7vhmZgXxuQuuCVoWx9/+GhColgAbCnQ1ygp3CWzEdiLWLAwJ61g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=dFpqqzfH; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=k5Bn0CrA; 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=1725716546; a=rsa-sha256; cv=none; b=eOvC4UeWKQmNSsaIpLOLYjzYbqWt/6CIfUsF0IYTjhOvfbL5RBxvTYPsbzL70wZbkNU2Uw N948SBfTp0v2g7AGXLse8m3VrNbLrvpdIIK0fZ0ITPec1E5n4pQ5UgZ8EVX9CITzB9dgfF josbMTP0YQWYCS9i2MryMgwdTae+GO/U5xf7HjgGRYJw9vJjkS++UQ+QZEFz2kJ86I0t0D QdYnqqAtZVxbakuXue9pcrLV2dRwXgIV5IKXM6U32Ktfc3don4McUNCu/vOXJmwHGM7VwJ Fsb9r0S/qxBWdPwB824G5eSF1tUgqMV5bjQ+QjyFGtlCBBACV/T3Nd0pjxWQxQ== 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 0BFC46693 for ; Sat, 07 Sep 2024 15:42:26 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1smvhT-0007E4-LL; Sat, 07 Sep 2024 09:42:03 -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 1smvhS-0007Dj-2B for guix-patches@gnu.org; Sat, 07 Sep 2024 09:42: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 1smvhR-0005PS-Po for guix-patches@gnu.org; Sat, 07 Sep 2024 09:42:01 -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:Date:References:In-Reply-To:From:To:Subject; bh=Kqxg3rLvtYkk+muk3QOkf5RNs9UC6BofQlBZf3J9x80=; b=dFpqqzfHWdmg5xZIPsrYbWBYSv/TBXm5mPxHoOc7yKgVLLVkXVMwVH8QjHZ1DbxzYa8L9G6lO5+QpT7KjsgnFytRiCcg3OvYAMcesMLAoVyO8EKz1DHYLz/HV5w/C/eWltK+YYFoeMyXMGDMbIFh/1GLeRt544W4OYW/YEAHew9p5QJ2ez37Cl7G0mZmF1XjU3vmTXft2NmVJYp0bwnmA846oQkhOxZe1HUj5FfVsSkm0NugcBYzfpza6XBwhbKiJOMbFX7b4gehSbgVgTE1ZO2BDpL1C6cWKTB4wmiuKZxoNlawnvHu7exMuqXxCGw5HA/lvW3F2SEGkMb+1a/rFQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1smvhS-00055B-JC for guix-patches@gnu.org; Sat, 07 Sep 2024 09:42:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73073] [PATCH 0/6] Allow origin with label as inputs. Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 07 Sep 2024 13:42: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: 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.172571650819505 (code B ref 73073); Sat, 07 Sep 2024 13:42:02 +0000 Received: (at 73073) by debbugs.gnu.org; 7 Sep 2024 13:41:48 +0000 Received: from localhost ([127.0.0.1]:55191 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1smvhD-00054W-Ev for submit@debbugs.gnu.org; Sat, 07 Sep 2024 09:41:47 -0400 Received: from mail-wr1-f52.google.com ([209.85.221.52]:53328) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1smvhA-000545-GR for 73073@debbugs.gnu.org; Sat, 07 Sep 2024 09:41:45 -0400 Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-374c3400367so2314074f8f.2 for <73073@debbugs.gnu.org>; Sat, 07 Sep 2024 06:41:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725716438; x=1726321238; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Kqxg3rLvtYkk+muk3QOkf5RNs9UC6BofQlBZf3J9x80=; b=k5Bn0CrAssVuYLwlfe7ECh2t8415KuMpECGTVRU0b5uajYU1I51GiXfnca1jQ7gRNG Gm+oBW72Bq92Jh68IDijbF28Kw4q7ZmzJRzIW3V8VGgzYlwR/AW66iO5iVlKGYgboR8U K1cbmBVw9sQmxlN5XJ4CaerYfWJeue6YTmqIfJfbm6o0sji0JvDXidrJAv2x5QDowawU oZDTgQ8eedgBSn7iz5T8urepGxf3hJrnUj5XQXyIyrniUDj/MVkgnr2RnBr79Ww8rGYI z1cFm8C0NM0sQ37VH2W6Tb5ZHmTDE+4CR/kuBDQblfcNK7ZuHl+CSXm2bxcNBqR8TKen F0xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725716438; x=1726321238; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Kqxg3rLvtYkk+muk3QOkf5RNs9UC6BofQlBZf3J9x80=; b=XUFEjSwK50FLMo+Tt1cc0Al4aFyb7exQpNXn2f/q7k0ft3MHyb1x0wHBYtxpaf1vAY z9GKUhdmgj4RAc8540MXtf6Oal0g1SFb+peEFpX4fP6VuPx1LtAE/pkUKHrlKse9m6/3 QCRA6zIPbQTKsSqI0MlflOjSnIVLEPjNPXkbQabXdKFPyWEFzR+Pdp4KoaYOC2VwzCbn DXulUC3WFfiGl+TmFDx9rFmhV3n3FpisvzU6nJCm4fbzQ1K1gJ7xOoNjLewrXJaBA3GL vPaBL0EPidCYOsxP4hA9wedHfy8mab4wgI8+a1J1Yc6VlxyaiwyNWCt13lbAdTPXcOHK oaCg== X-Forwarded-Encrypted: i=1; AJvYcCX9Iv5NmOM4c9qVi460kxWmHWGAAseMVlPCt5QY7yemLOjaFPUj6g5kHp0+FjgyW73nA0+MMg==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwytT6OQwpP1fy9J1MLE0p6sM+4FRPSkM/hh4ynO3OWhbgR7/Ji p72MPkmMGY6JGqzYLf8b2AUnxkMXY4a8e1aDz/mReFIk2XBlEeAsvDhOJA== X-Google-Smtp-Source: AGHT+IGaWNK3M6AXy5HN8X2vwoETxWtrGqp+uGnrttU0gish4s6Xr378C+y43rmVQe20t0tQ9hnOew== X-Received: by 2002:adf:cc91:0:b0:374:c658:706e with SMTP id ffacd0b85a97d-3789243fb15mr1983604f8f.39.1725716437866; Sat, 07 Sep 2024 06:40:37 -0700 (PDT) Received: from lili (2a01cb04060a11001b91bb720d6152eb.ipv6.abo.wanadoo.fr. [2a01:cb04:60a:1100:1b91:bb72:d61:52eb]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3789564a18asm1447606f8f.15.2024.09.07.06.40.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Sep 2024 06:40:37 -0700 (PDT) From: Simon Tournier In-Reply-To: <87o750wj6n.fsf@gnu.org> References: <87o750wj6n.fsf@gnu.org> Date: Sat, 07 Sep 2024 15:40:30 +0200 Message-ID: <875xr7r38x.fsf@gmail.com> 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: 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: -5.52 X-Migadu-Queue-Id: 0BFC46693 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -5.52 X-TUID: oXq/vePSrAiC Hi Ludo, On Fri, 06 Sep 2024 at 23:45, Ludovic Court=C3=A8s wrote: > This is one reason why I=E2=80=99d rather avoid the change you=E2=80=99re= 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. This is inaccurate: inputs are already polymorphic lists. For example, (native-inputs (list desktop-file-utils ;for update-desktop-database gettext-minimal `(,glib "bin") itstool pkg-config python)) And =E2=80=9Cbin=E2=80=9D is a label, AFAIU. That=E2=80=99s said=E2=80=A6 > 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=99= s taken > this long to do. =E2=80=A6I agree: my aim is not to revive the =E2=80=9Cold style=E2=80=9D. = Aside, from my perspective, the main issue with the =E2=80=9Cold style=E2=80=9D is not the= labels but instead it=E2=80=99s the redundancy. In other words, labels are not the evil since they are still used for dealing with =E2=80=9Coutputs=E2=80=9D. Anyway, let avoid the Walder=E2=80=99s law trap [1]. ;-) So let do not rely on explicit labels. > The main issue we want to address here is origins being hidden from > =E2=80=98package-direct-sources=E2=80=99, right? Yes=E2=80=A6 And also I think that=E2=80=99s a bad pattern to not have 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. > 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) > "_") > ,obj > ,@(if (string=3D? output "out") '() (list output))))) > + ((? origin? origin) > + (list (or (origin-actual-file-name origin) "_") origin)) > (x > `("_" ,x)))) >=20=20 > > =E2=80=A6 meaning we could write (this-package-input "git-manpages.tar.gz= ") or > similar. (This particular change would need tweaks in a few packages > such as =E2=80=98tzdata=E2=80=99 to avoid a full rebuild.) This solution appears to me the best approach. Somehow, it uses =E2=80=99file-name=E2=80=99 as internal =E2=80=9Clabel=E2=80=9D. When inte= rnal =E2=80=9Clabels=E2=80=9D will completely removed, e.g., using package name or else, we will adapt. 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. Therefore, it would mean something l= ike: #$(this-package-native-input (git-file-name "libgd" version)) This appears to me a good solution. However, how is it possible to avoid a full rebuild because =E2=80=99tzdata= =E2=80=99 or else? It means the package definition cannot be modified, right? Therefore, the only way would to special case =E2=80=99maybe-add-input-labe= ls=E2=80=99, e.g., --8<---------------cut here---------------start------------->8--- @@ -441,6 +441,9 @@ (define (maybe-add-input-labels inputs) "Add labels to INPUTS unless it already has them." (cond ((null? inputs) inputs) + ((and (pair? (car inputs)) + (origin? (cdar inputs)) ) + inputs) ((and (pair? (car inputs)) (string? (caar inputs))) inputs) --8<---------------cut here---------------end--------------->8--- Would it be ok performance-wise? Or what could the another option? Moreover, as you said some other packages deep in the graph seem in the picture. Well, I am going to explore this in order to send a v2. Cheers, simon 1: https://wiki.haskell.org/Wadler%27s_Law