From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 11 23:59:15 2022 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 To: Liliana Marie Prikler Subject: Re: [PATCH v5 2/2] home: services: Support user's fontconfig configuration. 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-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 (-) 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