From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id uJGaL0aT3GEdawEAgWs5BA (envelope-from ) for ; Mon, 10 Jan 2022 21:12:54 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id QKjqLEaT3GEeDgEA9RJhRA (envelope-from ) for ; Mon, 10 Jan 2022 21:12:54 +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 67AAC2B6B1 for ; Mon, 10 Jan 2022 21:12:54 +0100 (CET) Received: from localhost ([::1]:39998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n712D-0002nr-Hs for larch@yhetil.org; Mon, 10 Jan 2022 15:12:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57962) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7120-0002nf-1j for guix-devel@gnu.org; Mon, 10 Jan 2022 15:12:40 -0500 Received: from [2a00:1450:4864:20::342] (port=44854 helo=mail-wm1-x342.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n711x-0005JJ-Nn; Mon, 10 Jan 2022 15:12:39 -0500 Received: by mail-wm1-x342.google.com with SMTP id f141-20020a1c1f93000000b003497aec3f86so577421wmf.3; Mon, 10 Jan 2022 12:12:36 -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=jSH5fFQflOIzU8w3A+7QQe6gst5MmWgE8iNzuXHipGM=; b=YN8cm8XrBJgIYhQOgd87JP57px4tP/+KpDmh6I4KIBn3ZAvu6qjtcXnRh2sBLMxWqZ BO6w4y+Sl57XdqrpjfixlozPTWtaUHj1TEMS7PzfAhIdHwO7y8SZnNYl/qkGIpHtWMkk p9fijnJxlmpNVrC/TbowrlOnpdgpbxoxVVjXhwgegmiyGCPzmGO+kG3UpWwYIAjY9K2O mSZ9vtly/gX6LMoBj3hJJP+RFJltNr2XE2DAhHdz1/nGv8ZikPSCwki/1eemyDusk1si I9LBU4lC7DKbsc9np5XmLQcLs7rUATUNi8vEmSlMdSdHNzyWBht+ZDf1KttS6I/84akr Gurw== 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=jSH5fFQflOIzU8w3A+7QQe6gst5MmWgE8iNzuXHipGM=; b=Iys8tPwRD8eEBtvQ1ey9ZqR1IoKbmLD4tEoECpd2qXBrFQnlL7rvJQELkNvLc6b48J W8Mh00+UqvzGhHL9x/aUr2ZoEF46PKCHAXAA2eAVj6msRx1SJbOXjrifrlkOI+tUPIHz 1mWtmyoJIi8dVSVWc3nuVGE5ny9yn/4mhehOO5Bt3abphbW0oAOoJ0iy3MOzKBqFlZgL w2fRuaNb6W2ttO8rehw/qccCec2ang7VhC7wkXyCN4ZxwsMnFMiumlNXSJdfp20XtS4q p7ekjsl8dQZ48qWmk9HwekoqalzFOL+3QaAtSXIiaR+EApaRT4OjGsvpqy49YgDKadrg uw/w== X-Gm-Message-State: AOAM533xgw22sBenL5vs8sa5guI/n00csDl2U1ePLG0iSb+G6caqWuFl QnSOiO94Xxf93xGnf5PdUf0= X-Google-Smtp-Source: ABdhPJzrIqZzjUs9rXJe+N4oZeCGA8MZIv9qE1vWAn6mGXu7wcPA3QEX5FbtGI6yk4OjXwHOSpZxlg== X-Received: by 2002:a1c:f205:: with SMTP id s5mr930821wmc.33.1641845555140; Mon, 10 Jan 2022 12:12:35 -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 g12sm3909653wrm.109.2022.01.10.12.12.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jan 2022 12:12:34 -0800 (PST) Message-ID: <25ad4a52f0de315048670dbad61ebede8fc0a681.camel@gmail.com> 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: Mon, 10 Jan 2022 21:12:31 +0100 In-Reply-To: <87mtk33oou.fsf@trop.in> References: <878rvp1deg.fsf@trop.in> <871r1g4x6e.fsf@trop.in> <888e529cb04bb74bfd98f8e07db0c522efee9251.camel@gmail.com> <87mtk33oou.fsf@trop.in> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::342 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::342; envelope-from=liliana.prikler@gmail.com; helo=mail-wm1-x342.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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 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=1641845574; 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=jSH5fFQflOIzU8w3A+7QQe6gst5MmWgE8iNzuXHipGM=; b=SMA98FFwGm4D2XQ0AtPwu50iuAt2kZpA/GwlTMiQLWJJdj2xr5hQbh9nGOVQ+cEoDUYrUp vdRgvhh40SQyM+WBnwVkqoi7cJK3/+pL4/VdbF0WgNOkNG96PyOA3EbjJrM9ED3eRCE8zn 1nk+2yqH/T49Ge5hnOAC41J8FMKk5IE6maB6ZzQswfl3BqYwA70F3GXFLbyx89P76WDrUg tX9L0Rn9495wTEQKiw3uXFVFkct0od7Fx6V4lTYFEkCML87D9EPXmi1VzyuhkdRNeb7GgN UDijylXsblcS7+AGv8R6F0G3qDVVZJD528yMoD02EcnDEkywi9ii2RIUowQWxQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1641845574; a=rsa-sha256; cv=none; b=E74PCdgL11c4XhO/q4ycNzTLmXG2ADKvaJ4G64QVMVLBqeFWnP/Lzk2cPmvxDdPdRrvQ53 hQEdfTDi5PFYpIjeFbGm0NrO3qyGCq3c2URB573QD6zzUjUYKrLhQYIO9O1hX/8yYWStk2 b8I7bAmVAm0CWyeRWOQAgMGngS7Pj7CN1ezDZQJci42PFdEfoVKjmTbSUohf5TtfjEYcfk 9isZDN9IaB76fW66uptNXHXgIevcOCJf/lFkJwfa6A+JFNL7L89sGd2f3AMvm54t8f6SA1 iK09G2RZWQPXvbjyvTah1FDE4vXcSE/B3n2hxih31zMA6/bdsq6QI0SrKlulTA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=YN8cm8Xr; 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: -8.11 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=YN8cm8Xr; 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: 67AAC2B6B1 X-Spam-Score: -8.11 X-Migadu-Scanner: scn0.migadu.com X-TUID: 7pYGMt4IH9/5 Am Montag, dem 10.01.2022 um 12:49 +0300 schrieb Andrew Tropin: > [T]he whole point of escape hatch is to make it possible to reuse > existing files directly without any manipulation on them and importer > should demonstrate how to do it. That'd make more sense if the importer copied bashrc to some well-known location (e.g. ~/.config/guix/data/.bashrc) and then used that rather than the file it wishes to replace. IIRC that was one suggested behaviour of Guix Home in the past, but it didn't get approval because users wouldn't typically ask for that copying to happen. If you make it so that plain-file is used normally, but add a switch to express things in terms of local-file instead, that'd work. OTOH, I do think local-file is already well-documented on its own, so perhaps it'd only take a cookbook entry to show it in combination with Guix Home and an explanation as to why Guix Home doesn't do that normally while explaining all the caveats. > If importer internally do some manipulation (escaping) with the > content of the file and places the result in the string in scheme > file, user won't be able to replicate such process easily for other > services, which not covered by the importer. If I understood > correctly what you meant in the first message. Yes, the user would have to manually quote every new line of code they're adding, but they're free to use all other file-like objects, including local-file. Having (bashrc (local-file ".bashrc")), whether implemented on top of slurp-file-gexp or not, is inherently dangerous, though. > > The point I'm making is that we shouldn't swap out one bad > > abstraction for another, but pave the road towards good > > abstractions, e.g. G-expressions in the way the rest of Guix > > typically uses them. > > Actually, for me, the original implementation looks consistent with > how the rest of Guix treats G-expressions (uses already known > abstraction) and only new one intoduces a new abstraction. That's the point. The old style works just like you'd expect it to, it becomes a problem when you try to feed it stuff like slurp-file-gexp to work around some limitations in a way I'm not convinced makes sense. > [I]t's already possible to achieve the same [-- merging multiple > bashrc snippets into a single file --] with gexps/file-like in both > new and old text-config implementations. I find the lack of services in your example concerning, but I'll take your word for it. In that case, using a gexp for bashrc in the typical sense is probably the best idea, but we still need to do something with the reliance on slurp-file-gexp. Cheers > PS: > It's offtopic, but when you will have time please take a look at > https://issues.guix.gnu.org/52388. Hahaha, it's been a month, hasn't it? There's some aesthetic unpleasanties, so I'm not sure if I'll upstream it with slight stylistic changes or give you some harsher feedback, but I'll try to decide this weekend.