Subject: bug#56799: closed (Re: bug#56799: (gnu services configuration) usage of *unspecified* is problematic)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 25 Aug 2022 04:15:02 +0000

Your bug report

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

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
56799: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56799
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#56799: (gnu services configuration) usage of *unspecified* is problematic
From: Maxim Cournoyer <[email-masked]>
To: Attila Lendvai <[email-masked]>
Cc: [email-masked]
Date: Thu, 25 Aug 2022 00:14:30 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Attila,

Attila Lendvai <[email-masked]> writes:

> The new value of %unset-value sticks out more when something goes wrong, and
> is also more unique; i.e. easier to search for.
> ---
>  gnu/services/configuration.scm   | 5 +++--
>  gnu/services/messaging.scm       | 2 +-
>  tests/services/configuration.scm | 2 +-
>  3 files changed, 5 insertions(+), 4 deletions(-)

Thanks for the series!  I've now pushed all of the 5 commits.  Yay!

Closing!

Maxim

Subject: (gnu services configuration) usage of *unspecified* is problematic
From: Maxim Cournoyer <[email-masked]>
To: bug-guix <[email-masked]>
Cc: [email-masked]
Date: Wed, 27 Jul 2022 12:23:58 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

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