From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id OBjFJtHbG2WpUwEAauVa8A:P1 (envelope-from ) for ; Tue, 03 Oct 2023 11:16:01 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id OBjFJtHbG2WpUwEAauVa8A (envelope-from ) for ; Tue, 03 Oct 2023 11:16:01 +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 5C37FAC51 for ; Tue, 3 Oct 2023 11:16:00 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=JVCSIDNa; 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=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1696324561; h=from:from:sender:sender:reply-to: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=hz47foLZHY+Nkin4KdW7kOYNgtwXA7F0LHunKFSdZvE=; b=SbDeDWCXQ6eQHgzkLOK0Uef+eS5BAARWgDtKbKbjJNzizmgLgojlSN+TI39QVNE3uJNeOD SXL/3hKMaVZENDzsqwTGXbjWoXcEes+fjiVy8Vr4ohUxM0hFkCu2LEEjBqTbfeJfntB2cH 19pTbDULArDf334H8nFco2BrEySb45Ngjal0H9h2cluVqyEgpncOBkibipBlH/hs0VCjjc cigaiD+vcxCYczNl/YVLGbJjJPtm1ZBPVIv6+1jR7prRkYB63C+AMb7ZGz9j1u0QKi3xWM U4JEPjqOP8hpHS+hVfMhc89yfNBcTPNNeTLa2EObztl6b2EAfqKI7DcJF7+c5Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1696324561; a=rsa-sha256; cv=none; b=B7fvxSYmMumsiXdy6iw33y19wfnUwjmTfvnKAdaP9lMNJTCbpXGkRRak69ozIjZOfvhzTm 94BZk0ZjvFScxMdOo+fgDlmJyeJSnclEpfr6yFpOiTB9WguFibfh6NvZMXlAyVPJpphF5N 4e+L6B66SkPYmhu2u7pd6XRHE66EUjWs0QPuEJwWtbbPhJcMSe1fYWXifJRpdGDvXiP9Ap Wn46PA8ohliZlmnyyoOfGL8BZKl2CiBD6HOVJWDPqoVobgSNkLdvSMOPJldtEN1sjfntTq IEB97mKETHi+zVjoiy61VdW/dkoeaU9Vw+XB9hSZY+2wxFPvTyIgf19lSwUlbA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=JVCSIDNa; 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=pass (policy=none) header.from=gnu.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qnbVK-0006rk-A1; Tue, 03 Oct 2023 05:15:46 -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 1qnbVI-0006qU-QZ for guix-patches@gnu.org; Tue, 03 Oct 2023 05:15:44 -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 1qnbVI-00025Y-IF for guix-patches@gnu.org; Tue, 03 Oct 2023 05:15:44 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qnbVZ-0003LI-Ju for guix-patches@gnu.org; Tue, 03 Oct 2023 05:16:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65062] [PATCH core-updates 1/1] packages: Specify output in input label when it's not "out". Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 03 Oct 2023 09:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65062 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: moreinfo patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Josselin Poiret , Simon Tournier , Mathieu Othacehe , Tobias Geerinckx-Rice , Ricardo Wurmus , 65062@debbugs.gnu.org, Christopher Baines Received: via spool by 65062-submit@debbugs.gnu.org id=B65062.169632450712771 (code B ref 65062); Tue, 03 Oct 2023 09:16:01 +0000 Received: (at 65062) by debbugs.gnu.org; 3 Oct 2023 09:15:07 +0000 Received: from localhost ([127.0.0.1]:38774 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnbUh-0003Jt-8S for submit@debbugs.gnu.org; Tue, 03 Oct 2023 05:15:07 -0400 Received: from mail.boiledscript.com ([144.168.59.46]:36986) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnbUf-0003Jk-Er for 65062@debbugs.gnu.org; Tue, 03 Oct 2023 05:15:06 -0400 Date: Tue, 03 Oct 2023 17:13:34 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1696324370; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=hz47foLZHY+Nkin4KdW7kOYNgtwXA7F0LHunKFSdZvE=; b=JVCSIDNaHfyKjbEWrzkXDLtsNSwA1yC7dWeZD8+l+XlUQwphRiqKsQIpwangiPJblokIkq GqkdURgJM2tTakKuZQGsTm5iGQZkafad3NeRKW6RThynwCr2Wi1XGSaL6hSMTaL/H0AODm IQM1Nj5XAwgndWjMp9byCgIGtT/9y8cvXA28wNhTKIlCPcUq5h8DvuCsr9z/MSm+Zjfduf Rwo0l7vu+2fx4MvdHInuVxIU+egrBa4Gq7wXY5sI391aXAa+bsFyM4O+xVlukwLfx+ratB uRQxc/mScg1WYr+o9cowo8/LC8NnuFXEq/+wY8CKdC0TXMwMZgeYf35cVK/Rrw== Message-ID: <87jzs4vzk1.wl-hako@ultrarare.space> In-Reply-To: <87msxw1fw6.fsf@gnu.org> References: <875y575apr.fsf@gnu.org> <87msyhumwj.wl-hako@ultrarare.space> <87msxw1fw6.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ++ 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: , Reply-to: Hilton Chain X-ACL-Warn: , Hilton Chain via Guix-patches From: Hilton Chain via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx0.migadu.com X-Migadu-Spam-Score: -5.23 X-Spam-Score: -5.23 X-Migadu-Queue-Id: 5C37FAC51 X-TUID: knzvUJzDSy+0 Hi Ludo, On Sat, 09 Sep 2023 06:03:53 +0800, Ludovic Court=C3=A8s wrote: > > Hi, > > Hilton Chain skribis: > > >> Hilton Chain skribis: > >> > >> > * guix/packages.scm (add-input-label): Specify output when it's not = "out". > >> > >> [...] > >> > >> > + (list (string-append (package-name package) ":" output) > >> > + package > >> > + output))) > >> > >> The Grand Plan=C2=B9 is to eventually get rid of labels entirely (or a= lmost: > >> there=E2=80=99d still be input alists on the build side). As such, I = thought we > >> shouldn=E2=80=99t worry too much about what the actual label is. But = perhaps > >> you stumbled upon situations where this is a problem? Could you > >> describe them? > > [...] > > > My main concern is that currently modify-inputs, this-package-input > > and this-package-native-input operate on input labels and there would > > be duplicated labels if adding multiple outputs of a package. > > > > For modify-inputs, I think there's no approach to solve this without > > also specifying labels in inputs. > > Yes, good point. > > Another, more radical approach, would be to change semantics, whereby > (inputs (list p)) would mean that all the outputs of =E2=80=98p=E2=80=99,= not just > =E2=80=9Cout=E2=80=9D, are taken as inputs. That=E2=80=99d simplify inpu= ts at the expense of > precision, and (this-package-input NAME) would always be unambiguous. > > But maybe that=E2=80=99s too radical and uncertain. > > So all things considered, I guess you=E2=80=99re right and we should do w= hat you > propose. Thank you! > Minor issues: > > > --- a/guix/packages.scm > > +++ b/guix/packages.scm > > @@ -626,7 +626,13 @@ (define (add-input-label input) > > ((? package? package) > > (list (package-name package) package)) > > (((? package? package) output) ;XXX: ugly? > > - (list (package-name package) package output)) > > + (if (string=3D? output "out") > > + ;; (package "out") =3D> ("package" package "out") > > + (list (package-name package) package output) > > + ;; (package "output") =3D> ("package:output" package "output") > > + (list (string-append (package-name package) ":" output) > > + package > > + output))) > > Rather write it as two separate clauses, without comments: > > (((? package? package) "out") > =E2=80=A6) > (((? package? package) output) > =E2=80=A6) > > Could you also add a test case in =E2=80=98tests/packages.scm=E2=80=99 th= at would look > up inputs by those labels? I have thought about this patch again recently. First of all, I didn't describe my own trouble clearly: I wanted to put `this-package-input' into #$gcc:lib, but didn't know how. = Now I understand that (ungexp (this-package-input "gcc") "lib") can be used and i= nput labels are not quite related... And then I realised that there's too much extra work in package definitions= for the label change. So, how about looking up inputs by specification (name + version + output),= and falling back to input labels? I think this can address the issue regarding multiple outputs and versions, while keeping compatible with existing behav= ior. I'll send v2 for the change, with a different subject. Though I haven't wr= itten new tests for it, the existing (tests packages) passes when applied to mast= er and no package definition needs changing at least for building guix. Thanks