From: "Ludovic Courtès" <ludo@gnu.org>
To: 56075@debbugs.gnu.org
Cc: "Ludovic Courtès" <ludo@gnu.org>
Subject: [bug#56075] [PATCH 0/2] Report location of invalid configuration field values
Date: Sat, 18 Jun 2022 23:36:40 +0200 [thread overview]
Message-ID: <20220618213640.25039-1-ludo@gnu.org> (raw)
Hello Guix!
This change has ‘define-configuration’ use the ‘sanitize’ property to
type-check fields instead of a custom mechanism. More importantly, it
improves error reporting of invalid field value such that instead of:
guix home: error: Invalid value for field latitude: "44.81"
you get the location of the faulty field value:
home-config.scm:391:23: error: invalid value "44.81" for field 'latitude'
Additionally the message is now internationalized.
Thoughts?
Ludo’.
Ludovic Courtès (2):
services: configuration: Report the location of field type errors.
services: configuration: Remove 'validate-configuration'.
doc/guix.texi | 6 ---
gnu/services/configuration.scm | 64 +++++++++++++++++++++-----------
gnu/services/mail.scm | 6 +--
gnu/services/vpn.scm | 2 -
po/guix/POTFILES.in | 1 +
tests/services/configuration.scm | 12 ++++++
6 files changed, 57 insertions(+), 34 deletions(-)
base-commit: 7f208f68dea828fe02718ca8ce81d5975136cff8
--
2.36.1
next reply other threads:[~2022-06-18 21:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-18 21:36 Ludovic Courtès [this message]
2022-06-18 21:38 ` [bug#56075] [PATCH 1/2] services: configuration: Report the location of field type errors Ludovic Courtès
2022-06-18 21:38 ` [bug#56075] [PATCH 2/2] services: configuration: Remove 'validate-configuration' Ludovic Courtès
2022-06-23 18:30 ` Maxim Cournoyer
2022-06-23 16:05 ` [bug#56075] [PATCH 1/2] services: configuration: Report the location of field type errors Maxim Cournoyer
2022-06-24 21:43 ` bug#56075: [PATCH 0/2] Report location of invalid configuration field values Ludovic Courtès
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=20220618213640.25039-1-ludo@gnu.org \
--to=ludo@gnu.org \
--cc=56075@debbugs.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).