mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
services: configuration: Step back from *unspecified*.
Fixes <https://issues.guix.gnu.org/56799>.
This partially reverts 8cb1a49a39
.
Rationale: *unspecified* cannot be serialized thus used as a G-Expression
input, which is problematic/inconvenient when using deeply nested records. As
an example, jami-service-type was broken when using partially defined
<jami-account> records.
* gnu/services/configuration.scm (define-maybe-helper): Check against the
'unset symbol.
(normalize-field-type+def): Adjust value to 'unset.
(define-configuration-helper): Use 'unset as the default value thunk.
* gnu/services/file-sharing.scm (serialize-maybe-string): Check against the
'unset symbol.
(serialize-maybe-file-object): Likewise.
* gnu/services/messaging.scm (define-all-configurations): Use 'unset as
value.
(raw-content?): Check against 'unset symbol.
(prosody-configuration)[http-max-content-size]: Default to 'unset.
[http-external-url]: Likewise.
[mod-muc]: Likewise.
[raw-content]: Likewise.
* gnu/services/networking.scm (opendht-configuration): Adjust documentation.
* gnu/services/telephony.scm (jami-shepherd-services): Replace *undefined*
with the 'unset symbol.
* tests/services/configuration.scm ("maybe type, no default"): Check against
the 'unset symbol.
* doc/guix.texi: Regenerate the opendht-configuration,
openvpn-client-configuration and openvpn-server-configuration documentation.
This commit is contained in:
parent
4905b5b839
commit
a2b89a3319
7 changed files with 103 additions and 311 deletions
|
@ -151,9 +151,9 @@
|
|||
(not (defined? 'serialize-maybe-string)))
|
||||
|
||||
(test-assert "maybe type, no default"
|
||||
(unspecified?
|
||||
(config-with-maybe-string/no-serialization-name
|
||||
(config-with-maybe-string/no-serialization))))
|
||||
(eq? 'unset
|
||||
(config-with-maybe-string/no-serialization-name
|
||||
(config-with-maybe-string/no-serialization))))
|
||||
|
||||
(test-assert "maybe type, with default"
|
||||
(equal?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue