From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 12 00:21:19 2022 Received: (at 57963) by debbugs.gnu.org; 12 Oct 2022 04:21:19 +0000 Received: from localhost ([127.0.0.1]:55317 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiTF8-0001bd-JQ for submit@debbugs.gnu.org; Wed, 12 Oct 2022 00:21:19 -0400 Received: from mail-ej1-f68.google.com ([209.85.218.68]:43697) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiTF5-0001bC-Gj for 57963@debbugs.gnu.org; Wed, 12 Oct 2022 00:21:16 -0400 Received: by mail-ej1-f68.google.com with SMTP id d26so28370858eje.10 for <57963@debbugs.gnu.org>; Tue, 11 Oct 2022 21:21:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=Ddv8Wgp/ImDFeGgbLs5XLlbIG68BMh6jxdNjeUY0IYA=; b=dayf2nkQKhuD5etr/CK1cckcO0CQX2JyAZx9/SCEl8+fefM3zb7nxCXl+MOYey59bw ugeT77K1JrpI7y9Dm9rJw8zORpKN9Ml10BY6vLol8K3VDtQxAq9H4UotE57DsXJEArdl znuLYVRpm4PobTdWJ4VyxQSPpjCVwhc8g/4/KKWRqvtMNFmXuI4AAiioLqLxUDwOlTt7 doK/IcobMfskAdLDa9SmLYgdA31mPIUjUVyKnKVTO0hEKAQJhDOen7+a8bkrBmHovrcD TZ3IrmnIAPcyXhVtQxjlu/jfVDXF0GTBCxAoyCO18CqUr3G7IGX3q9rYqK4m1fPjtI6v 6zHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Ddv8Wgp/ImDFeGgbLs5XLlbIG68BMh6jxdNjeUY0IYA=; b=quDq7eTMyROYW+DWK9POu/iz3Y8ir/jFKLZPfoP9nREZ60mAjGhBClDDzJNlDVG+/D vaR+8eKneVkhOMR6bQDIdnYdQKWdGl1BY2rn05xmvXL/1BaMlpv2nWHQYx4gDq8JWfmh r2+De9RTm5XU6fRrQ+pmtYQbgRJ0BVhGmte3jDN+i1jSL5FKHo7jBJK1F/bpqtW3t9OZ M8rV7K0zSZUM5U3dBkKCej/w2rUB9oWA96KJErZEYXro5AYG9DkceJ7Zx2tzwPmJ344M wWxEpxH2tWajY2fUGAARM9wyCCIu+h56FLdkjRzd0LwgVtLhPdwEZzXv3yDOuj6Gvnxt LOOw== X-Gm-Message-State: ACrzQf3z0a6eQdOhIm4LPfMZjPpYCx5AOXb9IyJILPYJmjyQC+3hJe6i dhBUEp0rKS8QJbXMNY1Qs9I= X-Google-Smtp-Source: AMsMyM5WMx8hNEdBcLPFwSKlezajV0sJFrXcjKbLlQL/JwVny7L8+VQebOu9hfLe/WnDM1gXXJzFLg== X-Received: by 2002:a17:907:1b1e:b0:783:8e33:2d1c with SMTP id mp30-20020a1709071b1e00b007838e332d1cmr21013446ejc.304.1665548468435; Tue, 11 Oct 2022 21:21:08 -0700 (PDT) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id c12-20020aa7c98c000000b0045754cd5e08sm10381840edt.39.2022.10.11.21.21.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Oct 2022 21:21:07 -0700 (PDT) Message-ID: <0ead19bea58a05eccfe71d2d7035419bed33cf51.camel@gmail.com> Subject: Re: [PATCH v5 2/2] home: services: Support user's fontconfig configuration. From: Liliana Marie Prikler To: Taiju HIGASHI Date: Wed, 12 Oct 2022 06:21:06 +0200 In-Reply-To: <875ygpk7zt.fsf@taiju.info> 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> <87pmeykchl.fsf@taiju.info> <796ace856ca7ccb44fda2b15f8f7abc6990e53e0.camel@gmail.com> <875ygpk7zt.fsf@taiju.info> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.0 MIME-Version: 1.0 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 57963 Cc: ludo@gnu.org, 57963@debbugs.gnu.org, Andrew Tropin X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Am Mittwoch, dem 12.10.2022 um 12:59 +0900 schrieb Taiju HIGASHI: > Liliana Marie Prikler writes: >=20 > > Am Dienstag, dem 11.10.2022 um 17:09 +0900 schrieb Taiju HIGASHI: > > > Liliana Marie Prikler writes: > > >=20 > > > > 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. > > >=20 > > > I'm sorry, I may not be getting it. > > >=20 > > > When I reconfigure with the following settings: > > >=20 > > > --8<---------------cut here---------------start------------->8--- > > > (home-environment > > > =C2=A0(packages (list font-google-noto)) > > > =C2=A0(services > > > =C2=A0 (append > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (list > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (service home-bash-service-type)= ) > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (modify-services %home-base-services > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (home-fontconfig-service-t= ype > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 config =3D> (home-fo= ntconfig-configuration > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (extra-config > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (list "foo" = 123)))))))) > > > --8<---------------cut here---------------end--------------->8--- > > >=20 > > > The following error occurs. > > >=20 > > > --8<---------------cut here---------------start------------->8--- > > > ./pre-inst-env guix home container home-fontconfig-config.scm > > > Backtrace: > > > In guix/monads.scm: > > > =C2=A0=C2=A0=C2=A0 487:9 19 (_ _) > > > In gnu/services.scm: > > > =C2=A0 1137:16 18 (_ _) > > > In guix/monads.scm: > > > =C2=A0=C2=A0=C2=A0 487:9 17 (_ _) > > > In gnu/services.scm: > > > =C2=A0 1140:36 16 (_ _) > > > In srfi/srfi-1.scm: > > > =C2=A0=C2=A0 586:17 15 (map1 (#< type: # > > fontconfig > > > 7f1926abf=E2=80=A6>)) > > > In ice-9/eval.scm: > > > =C2=A0=C2=A0=C2=A0 155:9 14 (_ #(#(# > > 7f1926df8780>) #)) > > > =C2=A0=C2=A0=C2=A0 159:9 13 (_ #(#(# > > 7f1926df8780>) #)) > > > =C2=A0=C2=A0 173:55 12 (_ #(#(# > > 7f1926df8780>) #)) > > > In gnu/services/configuration.scm: > > > =C2=A0=C2=A0=C2=A0 124:8 11 (serialize-configuration _ _) > > > In srfi/srfi-1.scm: > > > =C2=A0=C2=A0 586:29 10 (map1 (#< name: font- > > > directories > > > type: str=E2=80=A6> =E2=80=A6)) > > > =C2=A0=C2=A0 586:29=C2=A0 9 (map1 (#< name: defa= ult-font- > > > serif- > > > family =E2=80=A6> =E2=80=A6)) > > > =C2=A0=C2=A0 586:29=C2=A0 8 (map1 (#< name: defa= ult-font- > > > sans- > > > serif-fa=E2=80=A6> =E2=80=A6)) > > > =C2=A0=C2=A0 586:29=C2=A0 7 (map1 (#< name: defa= ult-font- > > > monospace-fam=E2=80=A6> =E2=80=A6)) > > > =C2=A0=C2=A0 586:17=C2=A0 6 (map1 (#< name: extr= a-config > > > type: > > > maybe-ext=E2=80=A6>)) > > > In ice-9/eval.scm: > > > =C2=A0=C2=A0=C2=A0 155:9=C2=A0 5 (_ #(#(# > > 7f1926df8780>) # =E2=80=A6)) > > > In srfi/srfi-1.scm: > > > =C2=A0=C2=A0 586:29=C2=A0 4 (map1 ("foo" 123)) > > > =C2=A0=C2=A0 586:17=C2=A0 3 (map1 (123)) > > > In unknown file: > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 2 (raise= #<&formatted-message format: "'extra-config' > > > type > > > must be x=E2=80=A6>) > > > In ice-9/boot-9.scm: > > > =C2=A0 1685:16=C2=A0 1 (raise-exception _ #:continuable? _) > > > =C2=A0 1685:16=C2=A0 0 (raise-exception _ #:continuable? _) > > >=20 > > > ice-9/boot-9.scm:1685:16: In procedure raise-exception: > > > Wrong type (expecting exact integer): #<&formatted-message > > > format: > > > "'extra-config' type must be xml string or sxml list, was given: > > > ~a\n" arguments: (("foo" 123))> > > > --8<---------------cut here---------------end--------------->8--- > > >=20 > > > Is it sanitized before? > > That error seems to be coming from your sanitizer if I read this > > correctly. >=20 > Yes, I think so.=C2=A0 So I do not know what he meant when he said "Other > branches would never be visited." >=20 > =C2=A0=C2=A0=C2=A0 Other branches would never be visited because it will = fail > earlier > =C2=A0=C2=A0=C2=A0 by define-configuration predicate check for extra-conf= ig-list? > =C2=A0=C2=A0=C2=A0 (which is basically list?). >=20 > I may have misunderstood the location of the code to which his > comment refers. I think this basically means that you can't have a raw string, but only a list of strings, which conflicts with how you distinguish xml and sxml? > > > > > > Also, making multi-type fields is debatable, but isn't > > > > > > great > > > > > > IMO. > > > > >=20 > > > > > I see. If we had to choose one or the other, I would prefer > > > > > the > > > > > string-type field. > > > > Prefer sexp-type. > > >=20 > > > I too would like to write my settings in S-expression, but for > > > users > > > who know the XML format of fontconfig but do not know how to use > > > SXML, I believe the effort of converting XML to SXML in their > > > head > > > and writing it cannot be ignored. > > > Still, users can write settings in SXML and convert them to > > > strings. That is a choice the user prefers to make; someone who > > > doesn't know SXML writing strings and converting them to SXML is > > > not > > > a choice the user prefers to make. > > You can likewise convert xml->sxml explicitly, there's not really > > any > > difference here.=C2=A0 Providing this in a sanitizer just makes it more > > user-friendly. >=20 > I believe the v5 patch currently does that. Do you think a multi-type > field is acceptable? Or do you think it is better to keep only the > SXML-type field? I think the field, once sanitized, should be SXML. I care little about what happens before. Cheers