From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 7JZjKmyoRmNZiwAAbAwnHQ (envelope-from ) for ; Wed, 12 Oct 2022 13:43:40 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id MH1WKWyoRmMlHwEA9RJhRA (envelope-from ) for ; Wed, 12 Oct 2022 13:43:40 +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 4319E1101D for ; Wed, 12 Oct 2022 13:43:40 +0200 (CEST) Received: from localhost ([::1]:46490 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oia9D-0004cV-Fd for larch@yhetil.org; Wed, 12 Oct 2022 07:43:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43922) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oia8h-0004cG-GQ for guix-patches@gnu.org; Wed, 12 Oct 2022 07:43:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56868) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oia8h-0001Lh-5u for guix-patches@gnu.org; Wed, 12 Oct 2022 07:43:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oia8f-0002yg-Tp for guix-patches@gnu.org; Wed, 12 Oct 2022 07:43:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57963] Almost plain SXML serializer Resent-From: Taiju HIGASHI Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 12 Oct 2022 11:43:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57963 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Andrew Tropin Cc: ludo@gnu.org, 57963@debbugs.gnu.org, Liliana Marie Prikler Received: via spool by 57963-submit@debbugs.gnu.org id=B57963.166557494611170 (code B ref 57963); Wed, 12 Oct 2022 11:43:05 +0000 Received: (at 57963) by debbugs.gnu.org; 12 Oct 2022 11:42:26 +0000 Received: from localhost ([127.0.0.1]:55946 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oia7s-0002tl-Bd for submit@debbugs.gnu.org; Wed, 12 Oct 2022 07:42:25 -0400 Received: from mail-pf1-f169.google.com ([209.85.210.169]:38683) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oia7q-0002ta-Gq for 57963@debbugs.gnu.org; Wed, 12 Oct 2022 07:42:14 -0400 Received: by mail-pf1-f169.google.com with SMTP id p14so11911471pfq.5 for <57963@debbugs.gnu.org>; Wed, 12 Oct 2022 04:42:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=taiju-info.20210112.gappssmtp.com; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=whODAPZbvc6AFK9k3pueepiq4rTsadMtAnKhbHcgpa4=; b=lobX1G0SqosqE/3NtsCz7P5nDvURFMphH7C7VG0gKvRKXkfhzz6nebdjsMIXTmV/2r OtOfuP/8JgAAOtKR6aQXb90p2o9PuEqo8UfGdm4JkWM5Gv7XbIpdbPZ5yrPG/LZ4HmqA cu0Xt2kEJfxkF/pRBv2DArW3tZlBFiCNX7zGrL97s0KqSVvLdCX/5rSiWe4d29bPyyJa vI9iX3o5jkfxegpyFYJaxWABbjJg9Xm66/hSZRINchIorDkQ1W2qQcZ0Rltbfoa+0wdr 2rn7H0h1Vq8vVXx5sUD5qPh6qzKjaJT9u10fq6H3Mmgau3hIujPkHCZ+dcGIsg/vz0q0 zCUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=whODAPZbvc6AFK9k3pueepiq4rTsadMtAnKhbHcgpa4=; b=52HrfS1mdWmjKvQ8ZoZL/NwStc5Fk5XqAj0qzwGqo+1LN7xK0Ew1fllrqQGw/fjLkJ VyNlu2TcK01hKVdYiGWbyK758N0g60z+WMTnNMFbltexZWcSgBte/MFrIZFEp/3svrJq 2FVVXj+3JaJuiTye2dH4iOA6m7Sf4E3Xn05s5o9CZyfpt6SuKIj1kHbVlH6cgp10dw73 F+oT9+nQLzns8pfVn3u8S+ScvQs+SImeNIFHvLeY+ePLGVpIft0A9XVWLWgRXW5P1Tow VjuXIe3GfsjkCFx1GBEX3uT+PVUktWOpU6CeaWz6nmxPz7wD/TO8Lbf6Z8z0aFFlGwdl DiQw== X-Gm-Message-State: ACrzQf3pUnQmH2qIE8cYrhryzt9lqAO9EpGY7JJEJSHzGQXjgOudXMrn 2RS0LTnmW/n+UPpHYMmOzIwXzxgWd6NYMw== X-Google-Smtp-Source: AMsMyM7ykQ2k550qp3rtOsv28qB4VkNBkmKd0aPojns5FMHtwcasEoEoEh69RU9rZw11R0rMWwM7Dg== X-Received: by 2002:a05:6a00:2409:b0:54e:a3ad:d32d with SMTP id z9-20020a056a00240900b0054ea3add32dmr30340822pfh.70.1665574928824; Wed, 12 Oct 2022 04:42:08 -0700 (PDT) Received: from Taix ([240b:253:ec40:2400:b7d1:436e:2d61:e925]) by smtp.gmail.com with ESMTPSA id a8-20020a17090a008800b001fd7e56da4csm1266705pja.39.2022.10.12.04.42.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Oct 2022 04:42:08 -0700 (PDT) From: Taiju HIGASHI References: <20221002131535.9972-1-higashi@taiju.info> <20221002131535.9972-2-higashi@taiju.info> <87zge4chb5.fsf@trop.in> <87edvfkob8.fsf@taiju.info> <7a7ba84518d2f6afa387e1e2649bc249acd74750.camel@gmail.com> <87pmexmsei.fsf@trop.in> Date: Wed, 12 Oct 2022 20:42:05 +0900 In-Reply-To: <87pmexmsei.fsf@trop.in> (Andrew Tropin's message of "Wed, 12 Oct 2022 11:07:33 +0400") Message-ID: <87a661i7zm.fsf@taiju.info> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" 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=1665575020; 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: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=whODAPZbvc6AFK9k3pueepiq4rTsadMtAnKhbHcgpa4=; b=hfzc//c3LEraDL/7gwk9Dtfdx+fMbamPowF1XXaBhGih8zgYVM2AP1mPlMblnYlp8ue3Ra eVPJGsX0ZDYLnm+1q+yRqP9myBY/Qu8iF85Qntpb3vAPCh0uYeJEcDEq6N+tN9WqQbapqu MMZd7gGgFnF+ttUYY78sSaSX31SXfjwhnLBGtWOMPZRZywiVDJFbTzkDSQxwWk2VmGHfSk VzJpsKeVcRLFokOH6gyN7Curcm1CoEMMvRtqWn7KTqtKFKE8tgIepkw/wccvsG81mV9mgx D186s+6eGdqZ4XS8At+gfGsUlf5hj/FlFibyxq+VbZ6Q0QRpgGxpkaOeARPETg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665575020; a=rsa-sha256; cv=none; b=BCyNG1EbExyTrLCdpbXa43alUqbrlaiad2akyEhaOxUWK69LGcrKHTjrr+Wq0p9oKAGO7/ LIdgDbJilk2eBZOCroWtvD6H1XLzUSjssDvX05r3aKPs3BH3ZZQpXe6qM2XlyJ8uwbEA7O kF6dbQ8zMIcuhxaw7MUgBLezO6z4YXwFQUFRJ4Ptf74wFSdVO6EzDDVTukQjhsW0NA2zZv n9CHgJmBDyIM/geMvq5oxwrK4v581nxt68BepirVvrIYuixBwm07ybDQRlTIkfHdhL4OYx OD2Tqt8lXLiYieVEm2PltdX1+UqMyndl+lS/xzGPJ0quqzOWN3vO1JFjzaxq7A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=taiju-info.20210112.gappssmtp.com header.s=20210112 header.b=lobX1G0S; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 1.80 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=taiju-info.20210112.gappssmtp.com header.s=20210112 header.b=lobX1G0S; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 4319E1101D X-Spam-Score: 1.80 X-Migadu-Scanner: scn0.migadu.com X-TUID: K/2qUjWaCEmX Andrew Tropin writes: > On 2022-10-11 06:21, Liliana Marie Prikler wrote: > >> Am Dienstag, dem 11.10.2022 um 12:54 +0900 schrieb Taiju HIGASHI: >>> We can specify invalid value such as (list "foo" '(foo bar) 123). >> It will be sanitized before that. >> >>> > Also, making multi-type fields is debatable, but isn't great IMO. >>> >>> I see. If we had to choose one or the other, I would prefer the >>> string-type field. >> Prefer sexp-type. >> > > Current (v5) extra-config has a list type. This list can contain strings > and nested lists, string elements are for raw XML, and list > elements are for SXML. > > This is done I guess to support following use case: > > (list "Already existing XML copied from existing .xml file, which > we don't want to rewrite to SXML." > '((tag (@ (attr1 "value1") > (attr2 "value2")) > (nested "Part of the configuration defined with SXML") > (empty))) > "Maybe some other part of raw XML") > > This way we can combine SXML with already existing raw XML. > > Am I right? You're right. The current implementation allows XML string and SXML list in the list. Also, it can mix those. >>> > If serialization would support G-exps, we could write >>> > >>> > (list #~"RAW_XML_HERE") >>> > >>> > or even something like this: >>> > >>> > (list #~(READ-THE-WHOLE-FILE #$(local-file "our-old.xml"))) >>> >>> Does it mean that the specification does not allow it now? Or does it >>> mean that it is not possible with my implementation? >> I think your serialize would have to unpack the G-Expressions. You can >> test that with some example configs of your own. >> >>> > >> Cheers Thanks, -- Taiju