Ludovic Courtès fb7e6ccba7
services: configuration: Report the location of field type errors.
Previously field type errors would be reported in a non-standard way,
and without any source location information.  This fixes it.

* gnu/services/configuration.scm (configuration-field-error): Add a
'loc' parameter and honor it.  Use 'formatted-message' instead of plain
'format'.
(define-configuration-helper)[field-sanitizer]: New procedure.
Use it.  Use STEM as the identifier of the syntactic constructor of the
record type.  Add a 'sanitize' property to each field.  Remove now
useless STEM macro that would call 'validate-configuration'.
* gnu/services/mail.scm (serialize-listener-configuration): Adjust to
new 'configuration-field-error' prototype.
* tests/services/configuration.scm ("wrong type for a field"): New test.
* po/guix/POTFILES.in: Add gnu/services/configuration.scm.
2022-06-24 23:18:20 +02:00
..
2021-09-17 01:27:40 +02:00
2020-12-21 17:47:35 +01:00
2022-05-22 01:07:52 +02:00
2022-05-25 09:28:43 +02:00
2022-02-14 11:23:07 +01:00
2020-12-09 22:25:17 +01:00
2021-09-28 22:00:47 +02:00
2022-05-25 09:28:43 +02:00
2022-06-15 10:18:34 +02:00
2021-04-12 18:42:22 +02:00
2021-12-23 10:54:00 +01:00
2022-05-31 14:53:34 -04:00
2021-08-12 12:34:13 +02:00