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 ms5.migadu.com with LMTPS id SAVfCNE7RmP/SgAAbAwnHQ (envelope-from ) for ; Wed, 12 Oct 2022 06:00:17 +0200 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 IIJuCNE7RmNUYQAAauVa8A (envelope-from ) for ; Wed, 12 Oct 2022 06:00:17 +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 DEDC0D212 for ; Wed, 12 Oct 2022 06:00:16 +0200 (CEST) Received: from localhost ([::1]:50754 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oiSul-0004lq-Vv for larch@yhetil.org; Wed, 12 Oct 2022 00:00:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39254) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiSua-0004li-8b for guix-patches@gnu.org; Wed, 12 Oct 2022 00:00:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56224) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oiSuZ-0006zr-V3 for guix-patches@gnu.org; Wed, 12 Oct 2022 00:00:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oiSuZ-00013W-Jw for guix-patches@gnu.org; Wed, 12 Oct 2022 00:00:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57963] [PATCH v5 2/2] home: services: Support user's fontconfig configuration. Resent-From: Taiju HIGASHI Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 12 Oct 2022 04:00:03 +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: Liliana Marie Prikler Cc: ludo@gnu.org, 57963@debbugs.gnu.org, Andrew Tropin Received: via spool by 57963-submit@debbugs.gnu.org id=B57963.16655471553937 (code B ref 57963); Wed, 12 Oct 2022 04:00:03 +0000 Received: (at 57963) by debbugs.gnu.org; 12 Oct 2022 03:59:15 +0000 Received: from localhost ([127.0.0.1]:55301 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiStm-00011Q-Op for submit@debbugs.gnu.org; Tue, 11 Oct 2022 23:59:15 -0400 Received: from mail-pj1-f45.google.com ([209.85.216.45]:43889) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiStj-00011C-T4 for 57963@debbugs.gnu.org; Tue, 11 Oct 2022 23:59:13 -0400 Received: by mail-pj1-f45.google.com with SMTP id x31-20020a17090a38a200b0020d2afec803so866757pjb.2 for <57963@debbugs.gnu.org>; Tue, 11 Oct 2022 20:59:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=taiju-info.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding: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=fPOk0XrT915N51kecWBvy6fSis3djAY65tGxCAFCeZE=; b=yLxEladtKDV3WP/iYZ09ZCrF+XEIRls1ZBpYz0UPGIw6jJ9FYjCsHSBvs8bGL3r39P 6AJmaEoZsnjd0EMorkHOcLL3X3xf0u8J5KfE2HJABEZdCTgjaXQM0d+oYCZj5Bol/Har 9FiEnqtTykkRGhicEac/g77VpYCYQh15mYFy1+P+iMdk6+zNeF/PcasvokPoZhqDTPUg /JrQTvUtRPXVIBkwFZGkh4/Hf+Eix6Csz7TEXF1ybcQue7lW4ypti1alSVaC8xi0/lap tSCJLFJX8sFQzUo+3JYW/cYC6il5csmh5u2YURELmE/GtfzJX2lbrfbTk2QE4JqbR1gV +M4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding: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=fPOk0XrT915N51kecWBvy6fSis3djAY65tGxCAFCeZE=; b=fYstF9anoywvo357dZ2nvML0cQ3QD32aDZfXlMcN5Qda+rovfUrMxnAoxajVWblr9t 0jzjsm00f1hhJMVyZdSzr4+6IuS43o8/l665hjpFcBYHZsROJKx0Op7/WsoB0ZIjmQ45 EIPc0fwHJS0b+NPH3RBb7yRQSQna7e49Lr2Zu+sOU5k1Hxfxq9QYATuPwGWPpWXCbm8T 2jLGoF9o8MtE2Dj75AtAUOMbBb0JM81T5sY8I84RZQb8vKR+VBy1lhSFGAqUOd0xDq7V aBjqJXAPGWBO9SFpxl7JR8PVdt8QXWWUK1wHXtTUu+HXFWewkm3mvPbneqmbKrQK0JFq HKiw== X-Gm-Message-State: ACrzQf0bODkekZ0NYNmgWmzIkcsxUgNGW1qySjYTfKXX+4MYKfnLsNYp ue/NI59ut/yxSGBP7UE0mlrHfA== X-Google-Smtp-Source: AMsMyM6mSluQnG8j2TicfQAl0ChcYlsFq2crwij8Nj+3O+uxxzaurvuqdujdLUqA7/f0hPFpydlQWw== X-Received: by 2002:a17:902:f689:b0:179:fdac:c4e2 with SMTP id l9-20020a170902f68900b00179fdacc4e2mr28232800plg.119.1665547145910; Tue, 11 Oct 2022 20:59:05 -0700 (PDT) Received: from Taix ([240b:253:ec40:2400:b7d1:436e:2d61:e925]) by smtp.gmail.com with ESMTPSA id p17-20020a170902ead100b0017f778d4543sm9379542pld.241.2022.10.11.20.59.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Oct 2022 20:59:05 -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> <87pmeykchl.fsf@taiju.info> <796ace856ca7ccb44fda2b15f8f7abc6990e53e0.camel@gmail.com> Date: Wed, 12 Oct 2022 12:59:02 +0900 In-Reply-To: <796ace856ca7ccb44fda2b15f8f7abc6990e53e0.camel@gmail.com> (Liliana Marie Prikler's message of "Tue, 11 Oct 2022 20:24:48 +0200") Message-ID: <875ygpk7zt.fsf@taiju.info> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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=1665547217; 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: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=fPOk0XrT915N51kecWBvy6fSis3djAY65tGxCAFCeZE=; b=l/c3D2H0rQoT4IYI0WsIGpdiUMB8JsCq09cwE0KRl3tCbk8Rp7Joi4z7IWEfNagj6KnFaG QeKhN1B5y2nEEFTi6rYdpPn/+xq0h+4MJzrsI5P4wDVPtowNjcSCDFaxMJYYeyHGpcm8xh nyzsQUywLitqjyWzEgMY1FF8wrggQm9Y7i8nkvw0qfKbzqAJIE7a5bR1OZYfbEj3UU/W+c zuFRR35ZifsSbZUWsPWob+SU8TMXMJiDt4RiJAs6F5r8PIZM/N2TSgtKzdlTx21WI5i/Mf vtKbl8zmDFBFGXdqG6sOvCUyFXHBdT1ZDSgDgff7NmAfi/LbqEEjQEq8CJrQvA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665547217; a=rsa-sha256; cv=none; b=O7kDpzaVYOmRFBJBBVoTU+PHxVz9je5q+uKAe2DuIQvC2Wqc4FZPE+did6U8O5/xTpPDJY aTdm9uJ0EBBlGzuh1S65MzpLht5dEU/iJpbHsDizuXdbBYi75JYXbhwdJ7GYAlHJgnQpUD jeRQsXyCvs2TZNs8skhzAcLdY4nVnuI9DWprmhVYzcD8jSscpW/Z+znIxI0XrdFgNAqwM7 lBV50X0WKBT0zSePQcccVNEzhgb/KgDMJGsVbE6n0OInmaY7bZXhB2eGZh2QopPuFPsz4V /ZbM1nbhU2sRKSdRdBwdvEoyklE64pHhJo6dRbqHPw2LINIbZVGuhFMBBTae5g== 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=yLxEladt; 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: 2.60 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=taiju-info.20210112.gappssmtp.com header.s=20210112 header.b=yLxEladt; 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: DEDC0D212 X-Spam-Score: 2.60 X-Migadu-Scanner: scn1.migadu.com X-TUID: OlR2kl2cTS/d Liliana Marie Prikler writes: > Am Dienstag, dem 11.10.2022 um 17:09 +0900 schrieb Taiju HIGASHI: >> Liliana Marie Prikler writes: >> >> > 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. >> >> I'm sorry, I may not be getting it. >> >> When I reconfigure with the following settings: >> >> --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-type >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 config =3D> (home-fontc= onfig-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--- >> >> The following error occurs. >> >> --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: #> 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-directo= ries >> type: str=E2=80=A6> =E2=80=A6)) >> =C2=A0=C2=A0 586:29=C2=A0 9 (map1 (#< name: default= -font-serif- >> family =E2=80=A6> =E2=80=A6)) >> =C2=A0=C2=A0 586:29=C2=A0 8 (map1 (#< name: default= -font-sans- >> serif-fa=E2=80=A6> =E2=80=A6)) >> =C2=A0=C2=A0 586:29=C2=A0 7 (map1 (#< name: default= -font- >> monospace-fam=E2=80=A6> =E2=80=A6)) >> =C2=A0=C2=A0 586:17=C2=A0 6 (map1 (#< name: extra-c= onfig 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? _) >> >> 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--- >> >> Is it sanitized before? > That error seems to be coming from your sanitizer if I read this > correctly. Yes, I think so. So I do not know what he meant when he said "Other branches would never be visited." Other branches would never be visited because it will fail earlier by define-configuration predicate check for extra-config-list? (which is basically list?). I may have misunderstood the location of the code to which his comment refers. >> > > > 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. >> >> 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. Providing this in a sanitizer just makes it more > user-friendly. 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? Cheers, --=20 Taiju