From: "Ludovic Courtès" <ludo@gnu.org>
To: Ricardo Wurmus <rekado@elephly.net>
Cc: guix-devel@gnu.org, Maxim Cournoyer <maxim.cournoyer@gmail.com>
Subject: Re: better error messages through assertions
Date: Mon, 28 Feb 2022 14:02:09 +0100 [thread overview]
Message-ID: <87ilszdu0e.fsf@gnu.org> (raw)
In-Reply-To: <87lexx7nv4.fsf@elephly.net> (Ricardo Wurmus's message of "Sat, 26 Feb 2022 14:33:08 +0100")
Ricardo Wurmus <rekado@elephly.net> skribis:
> Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
>
>> I hear we now have "field sanitizers" on Guix records; without having
>> dug the details, it seems to be we could add a predicate validating the
>> input there?
>
> I don’t see how that would help here. In my example the service values
> themselves are all right. It’s a procedure acting on what it assumes is
> a list of service values that fails.
>
> Record field validation would not have prevented that error.
I think we could validate primarily at the user/core boundary. If the
‘services’ field had a sanitizer ensuring it’s a list of services, then
it’d be fine.
Ludo’.
next prev parent reply other threads:[~2022-02-28 13:03 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-14 22:32 better error messages through assertions Ricardo Wurmus
2022-02-15 8:48 ` Maxime Devos
2022-02-15 21:45 ` Philip McGrath
2022-02-15 22:15 ` Ricardo Wurmus
2022-02-28 12:59 ` Ludovic Courtès
2022-02-28 16:18 ` Philip McGrath
2022-03-07 10:13 ` Ludovic Courtès
2022-03-28 20:25 ` Philip McGrath
2022-03-30 9:37 ` Ludovic Courtès
2022-03-30 13:28 ` Andy Wingo
2022-04-01 8:47 ` Ludovic Courtès
2022-04-01 19:28 ` Philip McGrath
2022-04-05 12:04 ` Ludovic Courtès
2022-04-01 19:47 ` Philip McGrath
2022-02-22 4:31 ` Arun Isaac
2022-02-25 18:55 ` Maxim Cournoyer
2022-02-26 13:33 ` Ricardo Wurmus
2022-02-26 13:51 ` Maxim Cournoyer
2022-02-28 13:02 ` Ludovic Courtès [this message]
2022-02-28 16:00 ` Maxim Cournoyer
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ilszdu0e.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=maxim.cournoyer@gmail.com \
--cc=rekado@elephly.net \
/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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.