From: Taiju HIGASHI <higashi@taiju.info>
To: Liliana Marie Prikler <liliana.prikler@gmail.com>
Cc: ludo@gnu.org, 57963@debbugs.gnu.org, Andrew Tropin <andrew@trop.in>
Subject: [bug#57963] [PATCH v5 2/2] home: services: Support user's fontconfig configuration.
Date: Wed, 12 Oct 2022 12:59:02 +0900 [thread overview]
Message-ID: <875ygpk7zt.fsf@taiju.info> (raw)
In-Reply-To: <796ace856ca7ccb44fda2b15f8f7abc6990e53e0.camel@gmail.com> (Liliana Marie Prikler's message of "Tue, 11 Oct 2022 20:24:48 +0200")
Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
> Am Dienstag, dem 11.10.2022 um 17:09 +0900 schrieb Taiju HIGASHI:
>> Liliana Marie Prikler <liliana.prikler@gmail.com> 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
>> (packages (list font-google-noto))
>> (services
>> (append
>> (list
>> (service home-bash-service-type))
>> (modify-services %home-base-services
>> (home-fontconfig-service-type
>> config => (home-fontconfig-configuration
>> (extra-config
>> (list "<dir>foo</dir>" 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:
>> 487:9 19 (_ _)
>> In gnu/services.scm:
>> 1137:16 18 (_ _)
>> In guix/monads.scm:
>> 487:9 17 (_ _)
>> In gnu/services.scm:
>> 1140:36 16 (_ _)
>> In srfi/srfi-1.scm:
>> 586:17 15 (map1 (#<<service> type: #<service-type home-fontconfig
>> 7f1926abf…>))
>> In ice-9/eval.scm:
>> 155:9 14 (_ #(#(#<directory (gnu home services fontutils)
>> 7f1926df8780>) #))
>> 159:9 13 (_ #(#(#<directory (gnu home services fontutils)
>> 7f1926df8780>) #))
>> 173:55 12 (_ #(#(#<directory (gnu home services fontutils)
>> 7f1926df8780>) #))
>> In gnu/services/configuration.scm:
>> 124:8 11 (serialize-configuration _ _)
>> In srfi/srfi-1.scm:
>> 586:29 10 (map1 (#<<configuration-field> name: font-directories
>> type: str…> …))
>> 586:29 9 (map1 (#<<configuration-field> name: default-font-serif-
>> family …> …))
>> 586:29 8 (map1 (#<<configuration-field> name: default-font-sans-
>> serif-fa…> …))
>> 586:29 7 (map1 (#<<configuration-field> name: default-font-
>> monospace-fam…> …))
>> 586:17 6 (map1 (#<<configuration-field> name: extra-config type:
>> maybe-ext…>))
>> In ice-9/eval.scm:
>> 155:9 5 (_ #(#(#<directory (gnu home services fontutils)
>> 7f1926df8780>) # …))
>> In srfi/srfi-1.scm:
>> 586:29 4 (map1 ("<dir>foo</dir>" 123))
>> 586:17 3 (map1 (123))
>> In unknown file:
>> 2 (raise #<&formatted-message format: "'extra-config' type
>> must be x…>)
>> In ice-9/boot-9.scm:
>> 1685:16 1 (raise-exception _ #:continuable? _)
>> 1685:16 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: (("<dir>foo</dir>" 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,
--
Taiju
next prev parent reply other threads:[~2022-10-12 4:00 UTC|newest]
Thread overview: 102+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-21 0:27 [bug#57963] [PATCH 0/1] Support user's fontconfig Taiju HIGASHI
2022-09-21 0:29 ` [bug#57963] [PATCH 1/1] home: fontutils: " Taiju HIGASHI
2022-09-21 8:54 ` Liliana Marie Prikler
2022-09-21 9:59 ` Taiju HIGASHI
2022-09-21 11:40 ` Liliana Marie Prikler
2022-09-22 1:27 ` Taiju HIGASHI
2022-09-23 7:20 ` Liliana Marie Prikler
2022-09-22 1:20 ` [bug#57963] [PATCH v2] " Taiju HIGASHI
2022-09-22 6:14 ` Andrew Tropin
2022-09-22 8:53 ` Ludovic Courtès
2022-09-22 9:50 ` Taiju HIGASHI
2022-09-24 15:52 ` [bug#57963] [PATCH 0/1] " Ludovic Courtès
2022-09-24 22:58 ` Taiju HIGASHI
2022-09-25 6:25 ` Liliana Marie Prikler
2022-09-25 7:29 ` Taiju HIGASHI
2022-09-25 7:34 ` Taiju HIGASHI
2022-09-25 15:50 ` Liliana Marie Prikler
2022-09-26 1:43 ` Taiju HIGASHI
2022-09-26 18:19 ` Liliana Marie Prikler
2022-09-27 9:55 ` [bug#57963] [PATCH v3] home: fontutils: " Taiju HIGASHI
2022-09-27 10:10 ` Taiju HIGASHI
2022-09-28 21:15 ` [bug#57963] [PATCH 0/1] " Ludovic Courtès
2022-09-29 1:01 ` Taiju HIGASHI
2022-09-29 14:28 ` Ludovic Courtès
2022-09-29 14:51 ` Taiju HIGASHI
2022-09-29 16:02 ` ( via Guix-patches via
2022-09-30 0:12 ` Taiju HIGASHI
2022-09-30 18:30 ` liliana.prikler
2022-10-01 11:11 ` Taiju HIGASHI
2022-09-28 19:11 ` [bug#57963] [PATCH v3] home: fontutils: " Liliana Marie Prikler
2022-09-29 0:31 ` Taiju HIGASHI
2022-09-29 14:46 ` Taiju HIGASHI
2022-09-29 14:36 ` [bug#57963] [PATCH v4 1/2] home-services: Add base Taiju HIGASHI
2022-09-29 14:36 ` [bug#57963] [PATCH v4 2/2] home: fontutils: Support user's fontconfig Taiju HIGASHI
2022-09-29 14:55 ` Taiju HIGASHI
2022-09-30 18:34 ` liliana.prikler
2022-10-01 11:19 ` Taiju HIGASHI
2022-10-01 16:14 ` liliana.prikler
2022-10-02 13:22 ` Taiju HIGASHI
2022-10-01 21:57 ` Ludovic Courtès
2022-10-02 13:38 ` Taiju HIGASHI
2022-09-29 14:43 ` [bug#57963] [PATCH v4 1/2] home-services: Add base Liliana Marie Prikler
2022-09-29 15:09 ` Taiju HIGASHI
2022-09-30 18:21 ` liliana.prikler
2022-10-01 11:08 ` Taiju HIGASHI
2022-10-01 21:47 ` Ludovic Courtès
2022-10-02 13:45 ` Taiju HIGASHI
2022-10-02 14:59 ` Liliana Marie Prikler
2022-10-03 23:27 ` Taiju HIGASHI
2022-10-10 5:50 ` Andrew Tropin
2022-10-02 13:12 ` [bug#57963] [PATCH v5 1/2] home: services: " Taiju HIGASHI
2022-10-02 13:20 ` Taiju HIGASHI
2022-10-02 13:15 ` Taiju HIGASHI
2022-10-02 13:15 ` [bug#57963] [PATCH v5 2/2] home: services: Support user's fontconfig configuration Taiju HIGASHI
2022-10-10 6:40 ` Andrew Tropin
2022-10-10 16:15 ` Liliana Marie Prikler
2022-10-12 6:05 ` Andrew Tropin
2022-10-11 3:54 ` Taiju HIGASHI
2022-10-11 4:21 ` Liliana Marie Prikler
2022-10-11 8:09 ` Taiju HIGASHI
2022-10-11 18:24 ` Liliana Marie Prikler
2022-10-12 3:59 ` Taiju HIGASHI [this message]
2022-10-12 4:21 ` Liliana Marie Prikler
2022-10-12 7:07 ` [bug#57963] Almost plain SXML serializer Andrew Tropin
2022-10-12 11:42 ` Taiju HIGASHI
2022-10-12 13:03 ` Andrew Tropin
2022-10-12 18:23 ` Liliana Marie Prikler
2022-10-13 3:51 ` Andrew Tropin
2022-10-12 6:43 ` [bug#57963] [PATCH v5 2/2] home: services: Support user's fontconfig configuration Andrew Tropin
2022-10-12 11:38 ` Taiju HIGASHI
2022-10-12 12:41 ` Andrew Tropin
2022-10-13 12:37 ` Ludovic Courtès
2022-10-14 5:06 ` Andrew Tropin
2022-10-15 11:13 ` Taiju HIGASHI
2022-10-17 16:28 ` Ludovic Courtès
2022-10-18 12:41 ` Taiju HIGASHI
2022-10-19 21:42 ` Taiju HIGASHI
2022-10-20 1:23 ` [bug#57963] [PATCH 0/1] Support user's fontconfig Declan Tsien
2022-10-20 1:37 ` Taiju HIGASHI
2022-10-20 2:03 ` Declan Tsien
2022-10-20 3:44 ` Taiju HIGASHI
2022-10-20 5:06 ` Declan Tsien
2022-10-21 1:02 ` Taiju HIGASHI
2022-10-27 4:00 ` [bug#57963] [PATCH v5 2/2] home: services: Support user's fontconfig configuration Taiju HIGASHI
2022-10-27 5:18 ` Liliana Marie Prikler
2022-10-27 5:31 ` Taiju HIGASHI
2022-10-27 6:36 ` Liliana Marie Prikler
2022-11-02 1:43 ` Taiju HIGASHI
2022-11-02 6:45 ` Liliana Marie Prikler
2022-11-04 8:46 ` Taiju HIGASHI
2022-11-04 16:29 ` ( via Guix-patches via
2022-11-06 13:24 ` Taiju HIGASHI
2022-10-20 5:40 ` Declan Tsien
2022-10-21 4:03 ` Taiju HIGASHI
2022-10-21 5:02 ` Declan Tsien
2022-10-21 8:01 ` Taiju HIGASHI
2022-10-21 9:15 ` Declan Tsien
2022-10-23 6:32 ` Taiju HIGASHI
2022-10-23 7:33 ` Declan Tsien
2022-10-23 11:40 ` Taiju HIGASHI
2022-10-07 5:20 ` [bug#57963] Next steps for this issue Taiju HIGASHI
2022-10-07 5:44 ` Taiju HIGASHI
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875ygpk7zt.fsf@taiju.info \
--to=higashi@taiju.info \
--cc=57963@debbugs.gnu.org \
--cc=andrew@trop.in \
--cc=liliana.prikler@gmail.com \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).