X-Loop: help-debbugs@HIDDEN Subject: bug#68413: Ungexp doesn't work on deep lists Resent-From: Justin Veilleux <terramorpha@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-guix@HIDDEN Resent-Date: Sat, 13 Jan 2024 01:53:01 +0000 Resent-Message-ID: <handler.68413.B.170511076822972 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 68413 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 68413 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-guix@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.170511076822972 (code B ref -1); Sat, 13 Jan 2024 01:53:01 +0000 Received: (at submit) by debbugs.gnu.org; 13 Jan 2024 01:52:48 +0000 Received: from localhost ([127.0.0.1]:38029 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rOTCa-0005yS-2t for submit <at> debbugs.gnu.org; Fri, 12 Jan 2024 20:52:48 -0500 Received: from lists.gnu.org ([2001:470:142::17]:51476) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <terramorpha@HIDDEN>) id 1rOTCW-0005yE-Jp for submit <at> debbugs.gnu.org; Fri, 12 Jan 2024 20:52:46 -0500 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 <terramorpha@HIDDEN>) id 1rOTCS-0006G8-E3 for bug-guix@HIDDEN; Fri, 12 Jan 2024 20:52:40 -0500 Received: from mail.cock.li ([37.120.193.123]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <terramorpha@HIDDEN>) id 1rOTCP-0005gh-Vy for bug-guix@HIDDEN; Fri, 12 Jan 2024 20:52:40 -0500 From: Justin Veilleux <terramorpha@HIDDEN> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cock.li; s=mail; t=1705110743; bh=vKesA1XpE1Y1FaQb1b5HvJuqhaCqL9npY4Lw+31F+mc=; h=From:To:Subject:Date:From; b=cfcaLbiQn25n+Va+5KPG1sNHfPLeKtxePjHHS/yqvORVpQQvicHW4YU/z4B89OyV8 bk15jZSLLInbRjygA/h2o0y1XZC2BOyGOBFa/I2bQsOR4segKRAly2R/MiwbVVSbuU sD7/zFIRbaF6/A8t6AaTg1ImebNVWKCzdRvq7OZUyqZdMa7G0SFg6bWDpHXNPluNLj wNdz6KbuByGGfP7N8oONx8J2Y3RzDA2gLmErjNPK+4mrtmMvc2cZurWL+IttqfBShw MtGbKq1rrlJPzXbw3Gb6wTBIVNZiT47G+z3QtzwyVRNbN992n6jLmTDEQLTdpMP0MY AnJHb74BS9IsQ== Date: Fri, 12 Jan 2024 20:52:21 -0500 Message-ID: <87v87yvw2y.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=37.120.193.123; envelope-from=terramorpha@HIDDEN; helo=mail.cock.li X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.1 (/) Hi, I've been using G-expressions for some time and have always been hindered by `ungexp` not working on deeper lists. For instance, when I want to embed in a G-expression a list of packages, it works >(define packages (list coreutils gnu-make ...)) > > #~(for-each > (lambda (f) > ... do-something) > '#$packages) But as soon as I use an object in which the file-like objects are deeper, it fails > (define packages > (list > (cons "coreutils" coreutils) > (cons "make" gnu-make) > ...)) > > #~(for-each > (lambda (f) > ... do-something) > '#$packages) If I send a patch to "fix" this, will it be usefull or is there a reason for this behavior? Thanks.
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Justin Veilleux <terramorpha@HIDDEN> Subject: bug#68413: Acknowledgement (Ungexp doesn't work on deep lists) Message-ID: <handler.68413.B.170511076822972.ack <at> debbugs.gnu.org> References: <87v87yvw2y.fsf@HIDDEN> X-Gnu-PR-Message: ack 68413 X-Gnu-PR-Package: guix Reply-To: 68413 <at> debbugs.gnu.org Date: Sat, 13 Jan 2024 01:53:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-guix@HIDDEN If you wish to submit further information on this problem, please send it to 68413 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 68413: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D68413 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#68413: Ungexp doesn't work on deep lists Resent-From: Josselin Poiret <dev@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-guix@HIDDEN Resent-Date: Sat, 13 Jan 2024 11:39:01 +0000 Resent-Message-ID: <handler.68413.B68413.170514592630471 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 68413 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Justin Veilleux <terramorpha@HIDDEN>, 68413 <at> debbugs.gnu.org Received: via spool by 68413-submit <at> debbugs.gnu.org id=B68413.170514592630471 (code B ref 68413); Sat, 13 Jan 2024 11:39:01 +0000 Received: (at 68413) by debbugs.gnu.org; 13 Jan 2024 11:38:46 +0000 Received: from localhost ([127.0.0.1]:38622 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rOcLd-0007vO-Od for submit <at> debbugs.gnu.org; Sat, 13 Jan 2024 06:38:46 -0500 Received: from jpoiret.xyz ([206.189.101.64]:46770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <dev@HIDDEN>) id 1rOcLa-0007v9-Jn for 68413 <at> debbugs.gnu.org; Sat, 13 Jan 2024 06:38:45 -0500 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 0D5EC185453; Sat, 13 Jan 2024 11:38:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1705145922; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=K9s/jyjB4z9V4GRmjoSjuQb1h/Am6TuZzhXu+29bxTk=; b=Q74aX3CndtHQFkTQsBW8mNduF+nUy7HUNBsuwUWMs1VQiYrjrPZWChH8Th8vU704dlQrBi BTj+s+bULTH2DQxInVD2chYdn+xQcbtfZ6i5mIWAUXaCrs5DEF/ac4ONy5VmJqoZPADGds bI8tUZcDPtvSKnZLXW/2KE5zxDG7lQjAd63kSwIA09EMN4lI8EC0F9R2btwk503Bb0BYrY KeK1YvvpTRonnKFEWhIVuWDLQaJggs70tFleRumWmikhPNHlcbMOCPqahjxzah6BScXg8A EQTvcBw5la1+PuR+YzZ6ss5YaLU6ACixvfTLjDfwqawexFTv96BxaAbsFaW9hg== From: Josselin Poiret <dev@HIDDEN> In-Reply-To: <87v87yvw2y.fsf@HIDDEN> References: <87v87yvw2y.fsf@HIDDEN> Date: Sat, 13 Jan 2024 12:38:38 +0100 Message-ID: <87ttnhh39d.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spamd-Bar: / Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@HIDDEN smtp.mailfrom=dev@HIDDEN X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Justin, Justin Veilleux <terramorpha@HIDDEN> writes: >> (define packages >> (list >> (cons "coreutils" coreutils) >> (cons "make" gnu-make) >> ...)) >> >> #~(for-each >> (lambda (f) >> ... do-something) >> '#$packages) > > If I send a patch to "fix" this, will it be usefull or is there a reason > for this behavior? I think IMO that it's a bug, but it's also quite tricky to properly traverse deep structures like this. The bug comes from the fact that in gexp->sexp, we traverse lists by matching the reference with (refs ...), but that doesn't match if the reference is a pair instead. Then, it tries to match with ($ <gexp-input> (? self-quoting? x)), which does match since self-quoting? apparently returns #t on a pair, whether or not its constituents are also self-quoting. Best, =2D-=20 Josselin Poiret --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHEBAEBCAAuFiEEOSSM2EHGPMM23K8vUF5AuRYXGooFAmWidj4QHGRldkBqcG9p cmV0Lnh5egAKCRBQXkC5Fhcaij9YDACaNDfeMZsVBnnXyeSYtPhNu3VfkcN1UGZk sr3n9lFm8dnSJ5buUVNo5vXm34xgwuG+QrNe682Hmd8oj/Hn/oSTCcFn9+jkFpn4 QX7N30P+Rn9fXoB2tpj5B64pv6ITl3jL8Tkw5+l3EZKp4Mrl6QgfOrv8talCj3jv GDgPNuh+siek7S7u57HZNY5Re9gvhNvNE5XGMmCF47QQcfM76jnmojnxYDSw/aaK DexShbr/BWwkqSQn0VcinoJ+ASCy/tymqg2Vf/ooaMDDgGWEuz0N1C35qJRkp0GR DYXn+ffoaHmRqqJpuAfFwInIi4sFFC7OWWlgiRYfRXjniO7JB/wpUKi7xZ9ay3t5 +yK08wlnEAblRPnaS7x0fYhCUIJn5u5goBoGz86oghh05wNM+wuG4pf0WMqRlOww YF+XG0jrad6JrpC370epzDo/Z5qtJLwp5weDUqs8Q1J0wRyEokbYke+PGiqorLVs UnPVdmrIYdeTZApTb4olaUXFsJZjgLY= =PxKF -----END PGP SIGNATURE----- --=-=-=--
X-Loop: help-debbugs@HIDDEN Subject: bug#68413: Ungexp doesn't work on deep lists Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-guix@HIDDEN Resent-Date: Mon, 15 Jan 2024 09:47:02 +0000 Resent-Message-ID: <handler.68413.B68413.170531201226492 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 68413 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Josselin Poiret <dev@HIDDEN> Cc: Justin Veilleux <terramorpha@HIDDEN>, 68413 <at> debbugs.gnu.org Received: via spool by 68413-submit <at> debbugs.gnu.org id=B68413.170531201226492 (code B ref 68413); Mon, 15 Jan 2024 09:47:02 +0000 Received: (at 68413) by debbugs.gnu.org; 15 Jan 2024 09:46:52 +0000 Received: from localhost ([127.0.0.1]:44733 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rPJYS-0006sy-8D for submit <at> debbugs.gnu.org; Mon, 15 Jan 2024 04:46:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1rPJYQ-0006oK-En for 68413 <at> debbugs.gnu.org; Mon, 15 Jan 2024 04:46:51 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1rPJYK-0001g5-2f; Mon, 15 Jan 2024 04:46:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=FqjAtI8tHogsl0r72qjE2ELleX+/G/Osq0aV3TlTZdU=; b=ZrjLTZ++4UZUkIuP3ASe Yd1IN1nVumriG5QS10W+h+VZTBfd2s2WRsAA8H7aYKNH/Q/CHhQnYQFVs7NpGR4TuIlUPAWjkfTC2 BrmGc90kQpuEeT1b32DsdFc5sy1lIoKz3RFshFufH2xfKIKHzg9mLahOA0dL4xflTNFsng7ty4x5L fbWbUo3sU2ydCOYB8Tp0MArjyaL83BgjlPvaOnLtKlHbc5rIijzgl4omtYJ1AXZ8uE7nLfZyn0gzB Mn9Qg8s1ODro5ilW9JJPU8IUGgnI1b0FQ5S09pipCLM79m+1EsHZzGl3Sb+/DMxHPsyvvS7uyAdrn nkz4/nFPFygdAA==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> In-Reply-To: <87ttnhh39d.fsf@HIDDEN> (Josselin Poiret's message of "Sat, 13 Jan 2024 12:38:38 +0100") References: <87v87yvw2y.fsf@HIDDEN> <87ttnhh39d.fsf@HIDDEN> Date: Mon, 15 Jan 2024 10:46:42 +0100 Message-ID: <87le8rj5dp.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Hi, Josselin Poiret <dev@HIDDEN> skribis: > Justin Veilleux <terramorpha@HIDDEN> writes: > >>> (define packages >>> (list >>> (cons "coreutils" coreutils) >>> (cons "make" gnu-make) >>> ...)) >>> >>> #~(for-each >>> (lambda (f) >>> ... do-something) >>> '#$packages) >> >> If I send a patch to "fix" this, will it be usefull or is there a reason >> for this behavior? > > I think IMO that it's a bug, but it's also quite tricky to properly > traverse deep structures like this. The bug comes from the fact that in > gexp->sexp, we traverse lists by matching the reference with (refs ...), > but that doesn't match if the reference is a pair instead. Then, it > tries to match with ($ <gexp-input> (? self-quoting? x)), which does > match since self-quoting? apparently returns #t on a pair, whether or > not its constituents are also self-quoting. Actually, what bug are we talking about? It seems to work for me with this example: --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> (define packages `(("coreutils" ,coreutils) ("make" ,g= nu-make))) scheme@(guile-user)> ,build (scheme-file "foo" #~(begin '#$packages)) building /gnu/store/lq9gvbilv0y2nph00zxk6bn3lvcgdxqq-foo.drv... $7 =3D "/gnu/store/9ryh6v80jvjv3kwx0q782h26h9gbaclj-foo" scheme@(guile-user)> (call-with-input-file $7 get-string-all) $8 =3D "(begin (quote ((\"coreutils\" \"/gnu/store/mppp9hwxizx9g9pikwcvvshb= 2ffxyq7p-coreutils-9.1\") (\"make\" \"/gnu/store/9fadhs5qmwl5x7f669a0v39b3r= yrmmf1-make-4.3\"))))" --8<---------------cut here---------------end--------------->8--- One of the design decisions for gexps was to ensure that substituting a file-like object by its file name would be O(1) in most cases. Substitution in lists as in the example above is supported, but primarily for backward compatibility. It should be avoided when possible because it=E2=80=99s inefficient: =E2=80=98gexp->sexp=E2=80=99 nee= ds to traverse the whole list/tree in search of potential candidates. Thanks, Ludo=E2=80=99.
X-Loop: help-debbugs@HIDDEN Subject: bug#68413: Ungexp doesn't work on deep lists Resent-From: Josselin Poiret <dev@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-guix@HIDDEN Resent-Date: Mon, 15 Jan 2024 16:29:01 +0000 Resent-Message-ID: <handler.68413.B68413.170533613813563 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 68413 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Cc: Justin Veilleux <terramorpha@HIDDEN>, 68413 <at> debbugs.gnu.org Received: via spool by 68413-submit <at> debbugs.gnu.org id=B68413.170533613813563 (code B ref 68413); Mon, 15 Jan 2024 16:29:01 +0000 Received: (at 68413) by debbugs.gnu.org; 15 Jan 2024 16:28:58 +0000 Received: from localhost ([127.0.0.1]:46740 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rPPpZ-0003Wh-Vn for submit <at> debbugs.gnu.org; Mon, 15 Jan 2024 11:28:58 -0500 Received: from jpoiret.xyz ([206.189.101.64]:42058) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <dev@HIDDEN>) id 1rPPpY-0003WY-AM for 68413 <at> debbugs.gnu.org; Mon, 15 Jan 2024 11:28:57 -0500 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id B1211184D5F; Mon, 15 Jan 2024 16:28:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1705336134; 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: in-reply-to:in-reply-to:references:references; bh=nbKBSxWSTrr0s0buhajTOOebNQMohPuQO6+S1JL4/m4=; b=pihc2Y6ptgDnCd1PajrBMcW1N1vdr9NNzomkCJ+cmrvCw+jxhBTbrM5F1OYpxkOy58tFmC amlnWSOWPTk4jdmVLGcqnREW4SZE95tQWcYK6A/EcrM7vvVyv1YThQMwZ3DQwa+q5FF2P4 tS5npDMASaaM4RMTOZUAjUBsm1zoqtMx9CbAklt4KhBoBFYSXRXtklQFDVX5atU09bdD+E OhohmsZWBJxBaa48+szvHokXi+OfO75MG2NIzjZVXkR9mI7KJBQzgC7ES3po/wIf7Yg/GO YNGb+shvwReifNXn0EHDtMp7v39VikNITUgGCAfGaCnCW0lWAdtetUXwCCaB2A== From: Josselin Poiret <dev@HIDDEN> In-Reply-To: <87le8rj5dp.fsf@HIDDEN> References: <87v87yvw2y.fsf@HIDDEN> <87ttnhh39d.fsf@HIDDEN> <87le8rj5dp.fsf@HIDDEN> Date: Mon, 15 Jan 2024 17:28:47 +0100 Message-ID: <87bk9m1ry8.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spamd-Bar: -- Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@HIDDEN smtp.mailfrom=dev@HIDDEN X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ludo, Ludovic Court=C3=A8s <ludo@HIDDEN> writes: > Actually, what bug are we talking about? It seems to work for me with > this example: > > --8<---------------cut here---------------start------------->8--- > scheme@(guile-user)> (define packages `(("coreutils" ,coreutils) ("make" = ,gnu-make))) > scheme@(guile-user)> ,build (scheme-file "foo" #~(begin '#$packages)) > building /gnu/store/lq9gvbilv0y2nph00zxk6bn3lvcgdxqq-foo.drv... > $7 =3D "/gnu/store/9ryh6v80jvjv3kwx0q782h26h9gbaclj-foo" > scheme@(guile-user)> (call-with-input-file $7 get-string-all) > $8 =3D "(begin (quote ((\"coreutils\" \"/gnu/store/mppp9hwxizx9g9pikwcvvs= hb2ffxyq7p-coreutils-9.1\") (\"make\" \"/gnu/store/9fadhs5qmwl5x7f669a0v39b= 3ryrmmf1-make-4.3\"))))" > --8<---------------cut here---------------end--------------->8--- > > One of the design decisions for gexps was to ensure that substituting a > file-like object by its file name would be O(1) in most cases. > > Substitution in lists as in the example above is supported, but > primarily for backward compatibility. It should be avoided when > possible because it=E2=80=99s inefficient: =E2=80=98gexp->sexp=E2=80=99 n= eeds to traverse the > whole list/tree in search of potential candidates. Notice that OP's example uses `(("thing" . ,package)), ie. lists of pairs and not lists of lists, as in your case! Best, =2D-=20 Josselin Poiret --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHEBAEBCAAuFiEEOSSM2EHGPMM23K8vUF5AuRYXGooFAmWlXT8QHGRldkBqcG9p cmV0Lnh5egAKCRBQXkC5FhcairojC/9CurDR/TEqvZIn0O5WeT385pUtJ2PgC0GY qsCzJQxvQN3LwMRmK+Lp3J5jvHKkMCqh6ufyc5FhrsSaiWS6Il0dfzLhwfqwnAFz 18iw46Q/8CQ8myxxa0rCxuwQEBmy6vMfl1We56wGC8UPChM9QRXWbthv/1TLctCD yhKYv4nDjkpkT/nf/EhTOrdCeTuzve7CUkeud21uQ7q+bYLRkXnUfoHDQ+qIan3m SuYnnUDLPfzVJSZuxTxQ+DeI4TNFibrkwWzpGgsjFE4PcqDkgcRCe9oPF20XcmJA S9IzPcRF34bzp3IHipU5JmlRXYwGJriAAI5sImpm0jq2DaKHGshd9hwYUzw1obR5 0CLPpM/yksZOX2H2z3L5UZTnSZENs49k/LfR6LQpU2sDAsk0OE+ODoGgzQ0AYxJ8 EZxCn3TatNpZIxEmrLubqpCT0c5gXZU/NmJnQ2PPhDcDbtt2iupMhFMBjTifnTXG wFrQJHKdWWLhwLBjdStzgXcPznlk888= =lsmz -----END PGP SIGNATURE----- --=-=-=--
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.