From: ludo@gnu.org (Ludovic Courtès)
To: Julien Lepiller <julien@lepiller.eu>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] services: Make dovecot and cups configuration abstractions available
Date: Tue, 22 Nov 2016 23:49:23 +0100 [thread overview]
Message-ID: <874m2z9ll8.fsf@gnu.org> (raw)
In-Reply-To: <20161120180747.2e7b4b09@lepiller.eu> (Julien Lepiller's message of "Sun, 20 Nov 2016 18:07:47 +0100")
Hi Julien,
Julien Lepiller <julien@lepiller.eu> skribis:
> since I will probably use it in openvpn-service and maybe in
> nginx-service, I moved the definitions of the documentation that was
> duplicated in cups and dovecot to services.scm. Is it the best place
> for it?
Thanks for looking into it!
I would suggest moving it to a new (gnu services configuration) module
instead, if that’s fine with you.
Could you send an updated patch?
BTW, I just checked and there’s at least one subtle difference between
cups.scm and mail.scm: ‘define-configuration’ in cups.scm defines the
constructor as a macro that calls ‘validate-configuration’:
(define-syntax-rule (stem arg (... ...))
(let ((conf (#,(id #'stem #'% #'stem) arg (... ...))))
(validate-configuration conf
#,(id #'stem #'stem #'-fields))
conf))
The version in mail.scm does not do that, but I think we want to
preserve it (and your patch does seem to preserve that already).
Probably the are serializers that can be factorized as well.
> From 9acc9456f4e61506105bc109298aedb66e31efd0 Mon Sep 17 00:00:00 2001
> From: Julien Lepiller <julien@lepiller.eu>
> Date: Sun, 20 Nov 2016 17:56:08 +0100
> Subject: [PATCH] services: Make dovecot and cups configuration abstractions
> available.
>
> * gnu/services.scm: Add configuration-field, configuration-missing-field,
> configuration-field-error, serialize-confgiuration, define-configuration,
> validate-configuration, validate-configuration and generate-documetation.
> * gnu/services/cups.scm: Use it.
> * gnu/services/mail.scm: Use it.
Please take some time to see the ChangeLog convention for this.
> + ; (define (str x) (object->string x))
> + ; (define (generate configuration-name)
> + ; (match (assq-ref documentation configuration-name)
> + ; ((fields . sub-documentation)
> + ; `((para "Available " (code ,(str configuration-name)) " fields are:")
> + ; ,@(map
> + ; (lambda (f)
> + ; (let ((field-name (configuration-field-name f))
Why comment things out? Could it be moved to (gnu services
configuration) as well?
Thanks!
Ludo’.
next prev parent reply other threads:[~2016-11-22 22:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-20 17:07 [PATCH] services: Make dovecot and cups configuration abstractions available Julien Lepiller
2016-11-22 22:49 ` Ludovic Courtès [this message]
2016-11-23 21:08 ` Julien Lepiller
2016-11-23 21:46 ` Clément Lassieur
2016-11-24 13:25 ` Ludovic Courtès
2016-11-24 18:17 ` Julien Lepiller
2016-11-26 8:49 ` John Darrington
2016-11-26 18:37 ` Ludovic Courtès
2016-11-26 18:43 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874m2z9ll8.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=julien@lepiller.eu \
/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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.