From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id oP/MAdPE2mHjbwAAgWs5BA (envelope-from ) for ; Sun, 09 Jan 2022 12:19:47 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id oC4BOtLE2mEqGwAAauVa8A (envelope-from ) for ; Sun, 09 Jan 2022 12:19:46 +0100 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 7C1FF37557 for ; Sun, 9 Jan 2022 12:19:46 +0100 (CET) Received: from localhost ([::1]:38944 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n6WEi-000481-Ma for larch@yhetil.org; Sun, 09 Jan 2022 06:19:45 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40516) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6WEJ-00047c-2m for guix-devel@gnu.org; Sun, 09 Jan 2022 06:19:19 -0500 Received: from [2a00:1450:4864:20::442] (port=36460 helo=mail-wr1-x442.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n6WE9-0004hP-Qo; Sun, 09 Jan 2022 06:19:18 -0500 Received: by mail-wr1-x442.google.com with SMTP id r10so13519359wrc.3; Sun, 09 Jan 2022 03:19:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=p9ORyZJSFZC1Zdaz/cA/nCtXNjS+THb+sF4byrYhoDE=; b=Uln7JtL+plFRskx2uwlYOP0Tf8E5+Qhskj3NBIvN6ay93DoyC8CvaZH0SKWEf41VZs F386gczhsT+xn9bi6qSyzn6ZFaCDfqMmwQeSRpHPZiKm+Igus3ZE3dTx91CoBhO7aA5X LOGA+yP1RdXy1yErsJmrynMbQqObsYZkYvHBYYP8+0dQKunJuG4PPHWZ+p1qGKNm7U35 NksG4atVHI67dCL+vgH7xGGR4dxlVRHzN6vRXahqOKsUJNaFJhxNnoe7C+fIbRt9SjTH VfYZdOLsqKzMpvdXmWXOdHjCZyaWR7KGx/TjvjTisEwrBSa+TPxMM726OK14ymEYAkfZ 1uDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=p9ORyZJSFZC1Zdaz/cA/nCtXNjS+THb+sF4byrYhoDE=; b=POQsebFtkoRjqf0qMAtwWgi9dP+Zse/eIOPZjeaqOa1LSzb0UhZXQ4n72gvUDzeq2G EofUBCNR2oihdqFT1H586yaEgH5MRHK8kjjk7znuHsOmUzNJsPWH96Ls/9Tzew8QowLc k8NPzXz9clCksZstD1xy8cTX4zP4kYmlEMJUMXWVSQ3btsIWh3wlJiVjhxE7BvpM+ca+ MjUqOZ8sGbyvm3eqAGYVHv2KIX+K6j6Zn6MmeUdIU4zUF23pqQtXwwjPvM8cwKDBLc3m AerApyeozjdik1qJox8Jac97wvngPjOZ5C9/brH6kNbwZ3oJk5R65/5iP5s4fU3GTzG8 G8JQ== X-Gm-Message-State: AOAM533A+YoKLGcdhck/1ZiT279/0p85+8XKLeT53t/sNXzUxyEnxWwu RYxEH+N7mwXz2EwZ3jQlgAM= X-Google-Smtp-Source: ABdhPJyYz2Pkqqb1VZ6+rc6cg6CltFKFgPAySll7r68wFpsnFu3DjJJbPFvA8KLN1RTn6R24VH3l9Q== X-Received: by 2002:adf:f809:: with SMTP id s9mr1658291wrp.230.1641727145525; Sun, 09 Jan 2022 03:19:05 -0800 (PST) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id l12sm4104603wmq.2.2022.01.09.03.19.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jan 2022 03:19:05 -0800 (PST) Message-ID: Subject: Re: Return back original implementation for text-config serialization From: Liliana Marie Prikler To: Andrew Tropin , guix-devel@gnu.org, Oleg Pykhalov , Ludovic =?ISO-8859-1?Q?Court=E8s?= Date: Sun, 09 Jan 2022 12:19:03 +0100 In-Reply-To: <878rvp1deg.fsf@trop.in> References: <878rvp1deg.fsf@trop.in> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::442 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::442; envelope-from=liliana.prikler@gmail.com; helo=mail-wr1-x442.google.com X-Spam_score_int: -7 X-Spam_score: -0.8 X-Spam_bar: / X-Spam_report: (-0.8 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URI_NOVOWEL=0.5 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Xinglu Chen , guix-maintainers@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1641727186; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=p9ORyZJSFZC1Zdaz/cA/nCtXNjS+THb+sF4byrYhoDE=; b=VeiFRfmScDj+AEdf3gi6aoL/Mmziahk+oH2/KBj9dmLh8c71GvDS/dY16pcMwyM909UkqI Q+6JpcwHDTu4eigZhrSWUAHi3chwNlHo7Q6Ntu/3mBNjI6D2aidI1PS/zU3Bm3PJkKcleT CJ87X3s2AEwolYzp5ZWK8OKqtV6aH6gG4S+cDaZYH4FjfKSyghb/1n/m8TvIdJ7UqzUYyd K8h1RodZBh6jdb0yA7FkYc1Il2iPnYBzAhQ0kUsxUgLdGwVJb6W7CA7uvd129708QxYSx1 jpr4UYV8HNuLzocxhECN8X0BilbjTR8fTrlz0eSIoUrpc0LhVY/dbX/DZh3SGQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1641727186; a=rsa-sha256; cv=none; b=dFoeYCP7v43DdkppYYRi0vJUkYwy7aFDNfP0vgksQTaahrZZ2z9tj+ziRT54bU/Yo6WH8S Dyt/lx5Mc2j81s2yPsHKZC/WiywaYaXdFKzgygUdMIx4ZPiqRPsW0pwq8TSQmZITizrGRE jmwRWh0tvt0jPxhNeuyTp8h1AjtJZBRIrgmSn093SipJZCuCTJEVlCODgB8Gmg+CK9iDx6 cT14BU+Xr3qqIURWmkYCajgow5zntCsg80eIrAACE545mef7ZaYg2Elb5U0L1cvGZYj5JC +Nc2FimhtGswl8e1MMhfF6YXO9HiAQ4hwQBGl8/Oo5nHDXUtx8qPNNnKHkPT/Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Uln7JtL+; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.81 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Uln7JtL+; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 7C1FF37557 X-Spam-Score: -2.81 X-Migadu-Scanner: scn1.migadu.com X-TUID: lmOO21fczw8w Hi Andrew, Am Sonntag, dem 09.01.2022 um 12:12 +0300 schrieb Andrew Tropin: > Before fee0bc serialization for text-config worked this way: > --8<---------------cut here---------------start------------->8--- > `("string here" >   ,#~"string valued gexp" >   "source \" >   ,(local-file "blabla.sh")) > --8<---------------cut here---------------end--------------->8--- > > would yield something like: > > --8<---------------cut here---------------start------------->8--- > string here > string valued gexp > source \ > /gnu/store/00fl96dj2aak4i1vqvdqzlhbmmskc7fx-blabla.sh > --8<---------------cut here---------------end--------------->8--- > > [...] > > The new text-config serialization implementation (after fee0bc > commit) doesn't support gexps and tries to insert the literal content > of the file in place where file-like object was used[.] I agree that the old one looks nicer in this context, but wasn't the new one introduced to solve the issue of (slurp-file-gexp) in the importer? Meaning whichever way we go, we need something that allows us to insert literal file contents of another file at more or less G- exp compile time. Perhaps that issue could be solved, if instead the importer just reads the file contents and declares it as a variable as in (define %bashrc " ;; Original contents of bashrc ") (define bashrc (plain-file %bashrc)). WDYT? > If we want to insert the file path to file-like object for new-style > text-config internally we do something like > > (mixed-text-file ... >  "source \" "\n" >  #~(read-everything-from-file >     #$(computed-file "unecessary-file-name" >        #~#$(local-file "blabla.sh")))) > > when originally it was > (mixed-text-file >  "source \" "\n" >  (local-file "blabla.sh")) Is unnecessary-file-name ever created in this instance? I think we have something similar in other locations as well, where G-expressions are merged -- public keys for substitutes spring to mind. Perhaps all it'd need to make use of new-style text configs is a better way of quoting such things, e.g. a procedure which takes a file-like object and produces a plain file with its name. For the record, the use of (read-everything-from-file) in your example -- a procedure which I'm unable to find in my local Guix checkout -- makes it somewhat difficult to come up with concrete solutions here, so pardon me for being abstract. Cheers