bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#56799: (gnu services configuration) usage of *unspecified* is proble


From: Maxim Cournoyer
Subject: bug#56799: (gnu services configuration) usage of *unspecified* is problematic
Date: Wed, 27 Jul 2022 12:23:58 -0400

Hello Guix,

Since commit 8cb1a49a3998c39f315a4199b7d4a121a6d66449, the
define-configuration machinery in (gnu services configuration) uses
*unspecified* instead of 'disabled for an unspecified field value.

While this is indeed an improvement in readability, it introduces an
extra complication: because this new value is not self-quoting, it
cannot be used as is in G-Exps, and values using it must be carefully
expanded outside the gexp context, which is error prone.

This broke the jami-service-type, when partially specifying a
jami-account like so:

--8<---------------cut here---------------start------------->8---
(service jami-service-type
               (jami-configuration
                (accounts
                 (list (jami-account
                        (archive "/etc/jami/some-jami-account.gz"))))))
--8<---------------cut here---------------end--------------->8---

When building the operating system containing the above fragment, the
following error is throw:

--8<---------------cut here---------------start------------->8---
guix system: error: #<unspecified>: invalid G-expression input
--8<---------------cut here---------------end--------------->8---

The following change to the jami-provisioning test can also reproduce
the problem:

--8<---------------cut here---------------start------------->8---
modified   gnu/tests/telephony.scm
@@ -60,7 +60,7 @@ (define %moderators 
'("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
 (define %dummy-jami-account (jami-account
                              (archive %dummy-jami-account-archive)
                              (allowed-contacts %allowed-contacts)
-                             (moderators %moderators)
+;                             (moderators %moderators)
                              (rendezvous-point? #t)
                              (peer-discovery? #f)
                              (bootstrap-hostnames '("bootstrap.me"
--8<---------------cut here---------------end--------------->8---

--8<---------------cut here---------------start------------->8---
$ make check-system TESTS=jami-provisioning
Selected 1 system tests...
guix build: error: #<unspecified>: invalid G-expression input
make: *** [Makefile:6734: check-system] Error 1
--8<---------------cut here---------------end--------------->8---

I'd suggest we revisit 8cb1a49a3998c39f315a4199b7d4a121a6d66449 to use
'unspecified (the symbol) instead of *unspecified*, which *can* be
serialized without any fuss in gexps.

Thoughts?

Thanks,

Maxim





reply via email to

[Prev in Thread] Current Thread [Next in Thread]