all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Chris Marusich <cmmarusich@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: Guix-devel <guix-devel@gnu.org>
Subject: Re: Proposal: auto-instantiate services with a default value
Date: Tue, 09 Jan 2018 22:56:45 -0800	[thread overview]
Message-ID: <87tvvuw6aa.fsf@gmail.com> (raw)
In-Reply-To: <87y3l7wgf5.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 09 Jan 2018 10:05:34 +0100")

[-- Attachment #1: Type: text/plain, Size: 1815 bytes --]

ludo@gnu.org (Ludovic Courtès) writes:

> Hello Guix!
>
> Currently on GuixSD, users have to explicitly specify all the services
> they need, recursively.  For instance, if you add:
>
>   (service rottlog-service-type)
>
> to your ‘services’ field, you also need to add:
>
>   (service mcron-service-type)
>
> because the former happens to require the latter.  If you don’t do that,
> you get an error message (see ‘fold-services’ in (gnu services)), and
> then you go back to your config and add that line.
>
> This was intentional, but it’s annoying, especially when considering
> higher-level, complex services—imagine a MediaGoblin service: you
> wouldn’t want to manually specify a dozen services that, to you, are an
> implementation detail you’d rather ignore.
>
> We discussed some time ago the possibility to automatically instantiate
> services.  Now that service types have default value, I think it’s a
> viable approach: if a service is required, and *if* it provides a
> default value, then we can automatically instantiate it.
>
> So in the example above, you’d just specify ‘rottlog-service-type’ and
> an ‘mcron-service-type’ would be automatically added if it’s not already
> there.
>
> How does that sound?

This sounds great to me!  It would be quite convenient.

What will we do in the situation where two services S and T both require
a service U, but S and T require different configurations of U?  In this
case, it's clear that either S or T (or both) requires a non-default
configuration of U, so maybe this is outside the scope of what you've
proposed.

Is it intended that if I wish to modify a service's dependent services,
I would continue to do so via the usual methods (e.g., modify-services)?

-- 
Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  parent reply	other threads:[~2018-01-10  6:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-09  9:05 Proposal: auto-instantiate services with a default value Ludovic Courtès
2018-01-09 10:16 ` ng0
2018-01-09 10:59 ` Danny Milosavljevic
2018-01-09 12:25   ` Ludovic Courtès
2018-01-09 13:42     ` Ricardo Wurmus
2018-01-09 20:42       ` Ludovic Courtès
2018-01-10  6:56 ` Chris Marusich [this message]
2018-01-20 23:26 ` 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=87tvvuw6aa.fsf@gmail.com \
    --to=cmmarusich@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /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.