all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 35692-done@debbugs.gnu.org
Subject: bug#35692: [PATCH] system: vm: Auto-detect if inputs should be registered.
Date: Mon, 13 May 2019 23:09:31 -0400	[thread overview]
Message-ID: <87sgth7mvo.fsf@gmail.com> (raw)
In-Reply-To: <87a7frtl5i.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Sun, 12 May 2019 23:31:21 +0200")

Hello!

Ludovic Courtès <ludo@gnu.org> writes:

[...]

>>>From 59d78c066727d5c3df22a6e269025ae7e058b45c Mon Sep 17 00:00:00 2001
>> From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
>> Date: Tue, 16 Apr 2019 17:15:02 -0400
>> Subject: [PATCH] system: vm: Auto-detect if inputs should be registered.
>                    ^
> I’d just write “vm:” here.

Done.

>> The argument REGISTER-CLOSURE? of the SYSTEM-DOCKER-IMAGE procedure can be
>> removed and its value computed automatically, since the operating-system
>> definition is available in its context.  When the operating-system definition
>> does not contain the GUIX-SERVICE-TYPE, do not register the closure in the
>> database of Guix, as it takes time and doesn't serve a purpose.
>>
>> * gnu/system/vm.scm (use-modules): Add (gnu services base).
>
> Nitpick: We don’t usually document ‘use-modules’ changes here.

OK. I've removed it.

>> (system-docker-image): Remove the REGISTER-CLOSURES? argument, as well as its
>> associate documentation in the docstring.
>> [has-guix-service-type?] Add predicate and use it to compute the value of the
>> REGISTER-CLOSURE? argument of the INITIALIZE procedure.
>
>> +(define (has-guix-service-type? os)
>> +  (find (lambda (service)
>> +	  (eq? (service-kind service) guix-service-type))
>> +        (operating-system-services os)))
>
> Please add a docstring and make sure there are not tabs.  :-)

> Otherwise LGTM, thank you!

No, thanks to you for tirelessly reviewing many contributions while also
producing a mind boggling amount of new code/features :-).

I noticed that this change was breaking tests/guix-system.sh. The reason
was that the HAS-GUIX-SERVICE predicate could return a service type as a
truthy value, which was unwieldy when passed to environments which lack
the service definition.  The solution is to ensure that the predicate
return booleans values, using (not (not ...)).

I've also slightly improved the commit message and some docstrings, and pushed as
commit d03de6be0aa2e2889314b5ed9a8867375363d79f.

Thank you!

Maxim

      reply	other threads:[~2019-05-14  3:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-12  0:50 [bug#35692] [PATCH] system: vm: Auto-detect if inputs should be registered Maxim Cournoyer
2019-05-12 21:31 ` Ludovic Courtès
2019-05-14  3:09   ` Maxim Cournoyer [this message]

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=87sgth7mvo.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=35692-done@debbugs.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.