From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id wovlOOtrZGLoSgEAbAwnHQ (envelope-from ) for ; Sat, 23 Apr 2022 23:13:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id sCqsN+trZGLITQEAauVa8A (envelope-from ) for ; Sat, 23 Apr 2022 23:13:15 +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 3C8093DA6F for ; Sat, 23 Apr 2022 23:13:15 +0200 (CEST) Received: from localhost ([::1]:44740 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niN46-0002Bj-38 for larch@yhetil.org; Sat, 23 Apr 2022 17:13:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55320) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niN3u-0002BM-OY for bug-guix@gnu.org; Sat, 23 Apr 2022 17:13:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35231) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niN3u-0007cI-G5 for bug-guix@gnu.org; Sat, 23 Apr 2022 17:13:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1niN3u-0004qT-6I for bug-guix@gnu.org; Sat, 23 Apr 2022 17:13:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#42164: Combining file-append with gexps results in incomprehensible errors Resent-From: Brian Cully Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 23 Apr 2022 21:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42164 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxime Devos Received: via spool by 42164-submit@debbugs.gnu.org id=B42164.165074833918566 (code B ref 42164); Sat, 23 Apr 2022 21:13:02 +0000 Received: (at 42164) by debbugs.gnu.org; 23 Apr 2022 21:12:19 +0000 Received: from localhost ([127.0.0.1]:57359 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1niN3C-0004pM-DH for submit@debbugs.gnu.org; Sat, 23 Apr 2022 17:12:19 -0400 Received: from coleridge.kublai.com ([166.84.7.167]:57826 helo=mail.spork.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1niJqj-00085q-62 for 42164@debbugs.gnu.org; Sat, 23 Apr 2022 13:47:13 -0400 Received: from ditto (unknown [IPv6:2001:470:1f07:1b9:8650:a942:ec5e:856b]) by mail.spork.org (Postfix) with ESMTPSA id 8D7314B33; Sat, 23 Apr 2022 13:46:58 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=spork.org; s=dkim; t=1650736032; bh=wLACj+URHoCjOLEEDsTE8T1RMMMsx3v3/3sObbMvCgQ=; h=References:From:To:Cc:Subject:Date:In-reply-to; b=vYSJHfpXEhkwZqBYXS4+mpx+vglrYn3ZHj6rp9IB3MKlE2w8OnD13J3yZVMKTW2Y7 y1YPm9q21prmj4UWFrAR2wh3hn6hmdUJrX0HfeChKwSAEh5k6qSkEAfpjgtBovD9vb kuMekqtBfowDnDI40XmAQM0oGXUkCbVXd1r2iKM4= References: <20200702120029.vglwgexyasdzhgll@gravity> <87k0bfkca3.fsf@ditto.jhoto.spork.org> User-agent: mu4e 1.6.10; emacs 28.1 From: Brian Cully Date: Sat, 23 Apr 2022 13:29:18 -0400 In-reply-to: Message-ID: <87bkwrk7zk.fsf@ditto.jhoto.spork.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Sat, 23 Apr 2022 17:12:18 -0400 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: , Cc: 42164@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1650748395; 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=wqqjhaiZXQwTSCqNEZ9EDMRYEffiFZ4FKF5KO6rHHrI=; b=eZXSpIqtIwJesquoXgndyUXeHSEklYQb10IWN+kEVn9BXgVZ+0Dlsahbl76n3cUdkV8D6l t4grClWqaQ7mpsMqi8+rl0jRoLdJ8+HbbbXVFqwSJqBjSoE3JpYwRmC6pqTFRVlYIWEhCs GR9J9hfKsA5et0t2ZmnVL80XoWDJEbH6mKjOImm+9iBZNfClHYcMVZpkKHt4l4uZxxUOSn EoO0Avc9x5jH0XYbcLFa6X56aNh99QUojyMlUV7KZEgqRBAmXeZqR43ZT0cgHt1uHdR1u0 Akd8Hjo1Ixwk6Yj18Lj65iL/bjElpaWuPyi4HcSqu3uSZj3bQOjsuuqmD5N+1Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1650748395; a=rsa-sha256; cv=none; b=mUKQhkYTMEU3ffxA0Jjt/Fdnclb+UKMeIkSlygjUJljLfiD/odDqjKjyckAJ+HzVSqfzqF 8FiMeyY0sK7q8GkJ0LbLFrAv5Zbf/Dbs/17NkgHh+FiNeo5oBMF53jUoAota+IVDlPrSUA lz5DbdLhX8Ntloy1gcEIi2YqlSgfbAciX45dOBhKIRmDoOs0x7PANbAUuN+B2aRNDA5MTB AEqaE6k4L1Kj6YeeYjIld2TrXDH1NZAnMdAgwgdR2Sr9sxjQqT8s+8NezLepTac7rWPpMM H4tGvSHjNeqVYr/mlpgfo20Hi8jq/Po5356GlWeijXbIgLGybUDxt648QjrYyQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=spork.org header.s=dkim header.b=vYSJHfpX; dmarc=none; 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" X-Migadu-Spam-Score: 0.98 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=spork.org header.s=dkim header.b=vYSJHfpX; dmarc=none; 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" X-Migadu-Queue-Id: 3C8093DA6F X-Spam-Score: 0.98 X-Migadu-Scanner: scn1.migadu.com X-TUID: JBIczvs55hgp Maxime Devos writes: > Do you mean #~#$fa:output here? Yes, I did. Sorry, my fingers have minds of their own, and the gexp syntax, in particular, really runs counter to their memory. >> (file-append pkg:output "/path") > > This one is only possible if file-append becomes syntax instead of a > procedure. I did not expect this to be particularly possible, but I find it aesthetically and intuitively pleasing enough to propose it anyway. >> (file-append (list pkg "output") "/path") > > Possible, but seems semantically wrong to me -- what's a list doing in > a file-manipulating procedure? It need not be a list, but I do think it makes sense inside the file-append, rather than a modification to file-append=E2=80=99s results, a= s is currently the case. I picked list because it was being used elsewhere to explicitly select a derivation=E2=80=99s output. > My bikeshed proposal: > > (file-append (output glibc "static") "/lib/...") > > Here, 'output' is a procedure constructing some kind of object. > This would also be useful outside 'file-append', as it allows > programmatically constructing equivalents #~#$pkg:output for multiple > 'output' (there was some package definition some while back where this > would have been useful). > > This 'output' could perhaps also be used in 'inputs' / 'native-inputs' > fields. YMMV. I like this, and would prefer it over the =E2=80=98list=E2=80=99 proposal.= I=E2=80=99m not sure how to implement it given my limited knowledge of Guix internals, though. Special-casing a list inside of file-append was fairly straightforward and solved the immediate issue. I=E2=80=99d be happy to take a look at implementing this, but I=E2=80=99m = a bit clueless where to begin, as it=E2=80=99s much more general than my previous attempt. If you (or others) have the time, I=E2=80=99d appreciate any point= ers that=E2=80=99d make it easier to begin. For instance: I would expect the =E2=80=98output=E2=80=99 form to be lower= able, which would be done in the =E2=80=98compile=E2=80=99 branch of a gexp-compi= ler, but then it would have to be expanded later in the =E2=80=98expand=E2=80=99 branch, = which presents an issue: the third argument to the expander procedure is already an output. Would we do away with that argument? Somehow fill it in based on the =E2=80=98output=E2=80=99 form (either expressed or implicit= )? Let the =E2=80=98output=E2=80=99 form, if present, override it? -bjc