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 ms0.migadu.com with LMTPS id IO2HLm303mFjcAEAgWs5BA (envelope-from ) for ; Wed, 12 Jan 2022 16:31:57 +0100 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 qKcWK2303mEGVAAAauVa8A (envelope-from ) for ; Wed, 12 Jan 2022 16:31:57 +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 500791F13C for ; Wed, 12 Jan 2022 16:31:57 +0100 (CET) Received: from localhost ([::1]:33172 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n7fbQ-0002md-Ef for larch@yhetil.org; Wed, 12 Jan 2022 10:31:56 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50646) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7fBs-0005Tz-Hf for guix-devel@gnu.org; Wed, 12 Jan 2022 10:05:33 -0500 Received: from [2a00:1450:4864:20::12b] (port=44896 helo=mail-lf1-x12b.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n7fBm-0006bk-Rz for guix-devel@gnu.org; Wed, 12 Jan 2022 10:05:31 -0500 Received: by mail-lf1-x12b.google.com with SMTP id o15so9079212lfo.11 for ; Wed, 12 Jan 2022 07:05:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop-in.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=mY5iIcS+5zSAwnBv7rSijxnYXT4PJ7VnFgTA4mqTe3I=; b=ShoO/zrSL7LHgkyETvRMlk0Pk7u9Cds+1A8wCDX1lyWwTXJgOuES09JN9GxDKSCmYJ pzOw9pEWTf2BbC+XuexIOwvvTLUpCOjFx1sG0CC4xWHLxOgQHz4GFA8veZig5hhevBey tblerFkJLHIVOpjqjU0j+aLM79ScQE7ADoJiiZliMlojsGlxGTjdLEnWFzPNtU7QJsLK a44XSrD58uEhsmJk2KaZ+RTypplCYRQyNq6fyYgeN9xUs/KwtO+b8qIqeePqeBpYjV57 OefxctjqNIdtOcuOTumTO704j7pJ8XJMdZYm0Fs3+8quM5MLD8WS59KAXpf2h0CZHcHj CqUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=mY5iIcS+5zSAwnBv7rSijxnYXT4PJ7VnFgTA4mqTe3I=; b=ElTAgXena3U/zKMvWl0ZLbzwcxeb+SX8a5jDtULl54txq6hvhlqrHliKBfapc1ZO4E ozTbd6V15ctzBp0bN3t00YdRU9h+eqjoB1eSgUqLBibzyh15xpYD6Pca3uxXCdNkdDOv Q20/Jjzy86gpLtqViQ5At8Y6ZOZbukyvBDeMSOO4XNIKlzibuNdxuReajdk8feFVUvcN fhbCzys3NGZiNsKWR1tvgCcrue8zmIrEY3IU21b0C5UE828iEELI+9F4fW4ycoRPgzMj tk6EtBt3sKHWDS3tnFF8Q8oYjkbCc58n3wTvVZDq+DcJlY1uDB5fYm8y5x/zPvAqfHtP taXQ== X-Gm-Message-State: AOAM533P5j1C/Qg3kEnoMazLYWT7R8yeMAOyjpVY+aHb1e5xyWxzmQB8 r452lHM9G0FxHthGAxJ2ucfuwg== X-Google-Smtp-Source: ABdhPJz+D9HB0uM3BHvwA0h+rA7F0fgTxw95BNG2cazcVY04ZsvzpAKa0IdOZBIcd45PhagSXX7a8g== X-Received: by 2002:ac2:4e02:: with SMTP id e2mr134250lfr.50.1641999924089; Wed, 12 Jan 2022 07:05:24 -0800 (PST) Received: from localhost (109-252-167-227.dynamic.spd-mgts.ru. [109.252.167.227]) by smtp.gmail.com with ESMTPSA id i16sm11477lfj.190.2022.01.12.07.05.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 07:05:23 -0800 (PST) From: Andrew Tropin To: Liliana Marie Prikler , guix-devel@gnu.org, Oleg Pykhalov , Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: Return back original implementation for text-config serialization In-Reply-To: <25ad4a52f0de315048670dbad61ebede8fc0a681.camel@gmail.com> References: <878rvp1deg.fsf@trop.in> <871r1g4x6e.fsf@trop.in> <888e529cb04bb74bfd98f8e07db0c522efee9251.camel@gmail.com> <87mtk33oou.fsf@trop.in> <25ad4a52f0de315048670dbad61ebede8fc0a681.camel@gmail.com> Date: Wed, 12 Jan 2022 18:05:20 +0300 Message-ID: <87ee5df0zz.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::12b (failed) Received-SPF: none client-ip=2a00:1450:4864:20::12b; envelope-from=andrew@trop.in; helo=mail-lf1-x12b.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_NONE=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=1642001517; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=mY5iIcS+5zSAwnBv7rSijxnYXT4PJ7VnFgTA4mqTe3I=; b=pCii0wIq4bOLsfUhIzY/KtMZhPhGHrxS8KvaYPTHvAJuqO8tmhmpR57hur1lqWN9ydGhOn HmGvxGI23PBFtLDq7TojMygqzQV7Bq/hpvj9+XdRgddQV3cXjyTyZp9T74eYcknmB48YbP 1I9WCgaN9ct9DmzBjqEj2fhnwQf9rw9w0Sp73y10aP/U5+/wyIxGW/GsIOf8HT3r/Vx6Dt m91BTPXeA8Ayl/lul0w+B480SoJ7H5oi7/3OnxnJAw6yxvxqRML4S1hl198Z3FAnln+Jwg Kzp/54buM8T2tyNX1C+5C3LRqBQXhaFsPY/EO9iDA+CwdUFxgP9F8Q1+Sb6TvQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642001517; a=rsa-sha256; cv=none; b=YMC4Qfeggkt7TVBVY+yRpay5gA0BJBajI3nH8SRFp6g0otTZPRs37kwDZQ1f1N2/M3KP/A QAxYhuBZtFc+BFrD4boYAl6LZEXKO7XJWiA6FDZLExJGTO3A+G9uRThfWkYQKHk/SEP7vL xaMbgfVUT7jdadQkzDeyqdqxYj+A+Z+hlOY/eHpD3MZ2/D4ieJ0ZzXzop4fzNjc50sU3iN N4qvGns1VEaE6A34AZoYdKoHlD9kQA2ANtJQwzWONieM2B17anWFbXGkeFeeWVNki7rhz0 w9fGjtagnwiql75HWIzRPLygeQKW0ZNrV2+jzJA7G4Hoi0LATYqDJcC5ZKSjfw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=trop-in.20210112.gappssmtp.com header.s=20210112 header.b="ShoO/zrS"; dmarc=none; 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: -5.42 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=trop-in.20210112.gappssmtp.com header.s=20210112 header.b="ShoO/zrS"; dmarc=none; 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: 500791F13C X-Spam-Score: -5.42 X-Migadu-Scanner: scn0.migadu.com X-TUID: LIVuTcF5gCQz --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 2022-01-10 21:12, Liliana Marie Prikler wrote: > 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.=20=20 > > 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. It seems that current implementation of importer copy files to the directory provided as command line argument and after that generates a config file, which refers those files with local-file. Overall, I think that the importer is not really well-defined both in terms of purpose and implementation and maybe it will be better to hold it until it polished. >> 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. > From=20this >> > 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. >>=20 >> 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. > and this, it looks like you are concerned with local-file, which can lead to the non-reproducible code, when for example the local-file refers something outside of the git repo and on another machine the same config will lead to an error? And slurp-file-gexp additionally hides it from the user by wrapping local-file. Correct me if I'm wrong. >> [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 > >>=20 > 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. > Yep :) Thank you, will be waiting for it!) =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJDBAEBCgAtFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmHe7jAPHGFuZHJld0B0 cm9wLmluAAoJECII0glYwd6wCvUP/0ENJqrkrnrvFANgsjzrlss6ly9wkhJLzbEv cgQoO1UrZfhTdd8ZhjHTtvzaGoDbnX4lf8W06pnK+VIlzx3sdjA1wufSLqnDJSel dapxq3ZopYtSIPvFdx4NyhQFskakHbdrIMfwMPohuqL/hLljbpE+yzhw54V8RYho guA18A8UxeelC0e0m7CcchnbWyw28D2+6XAxUtxfqztfM95Ampd7QMfcMHN/AjNd gRIAAwv03AOc70LmvLTJluA2s7a30DnLDsr7MxH/Bc6WxCNbUWk+b4ejLoAPKuqd EyBhimIi6iXo33OpuwwNdVuoHcwvwb1fJbZIW1ODOQ1Ox0BqO0V2UaatqwmNsHnu JAQVyVXU/YCZpFlEVUtzIunsYKUINIg/emqqbACsoak4bep8vGkPLGymdM/yQOwF PpplfE+Et4VfrgPYG3Kq9viY+g4wEO6Ja2XzJzZj6sim4EFESIQFWXKWKy/e/mwz I4srWbiqKljLSJsi2VxJFDsun19kkSv3WFJjUOXN2+X64+DmlXwnDV54/4riglJp pOA8D3LlfGbecp+o8AY0j3bZbXqP/13ssIR/DW/lBbgMXyqR/UhCj6kQpna9aTDZ cIBoBSWDJ5DM3xmBEF8N/nvHnd+6aJ/L2eEL+mdGbbYEsyWZPAEVyDa6U3euGaZi 4szXMN4i =MfDe -----END PGP SIGNATURE----- --=-=-=--