all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "宋文武 via Guix-patches via" <guix-patches@gnu.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 62584@debbugs.gnu.org
Subject: [bug#62584] [PATCH] services: Add error/success service type.
Date: Sat, 01 Apr 2023 18:34:54 +0800	[thread overview]
Message-ID: <87y1nbevqp.fsf@envs.net> (raw)
In-Reply-To: <20230401072842.13315-1-ludo@gnu.org> ("Ludovic Courtès"'s message of "Sat, 1 Apr 2023 09:28:42 +0200")

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

> I think it’s good to have it by default, but that’s something we can
> discuss.

Okay, I don't think so...

> +(define (error/success-boot-gexp _)
> +  #~(begin
> +      (display "error in finalization thread: Success\n"
> +               (current-error-port))
> +      (sleep 2)))           ;let the user notice--all this hasn't been in vain

How about make the message and delay customable?

I prefer "No error in finalization thread: Success",
and 2 seconds may not be enough for a slow reader like me!

> +
> +(define error/success-service-type
> +  (service-type
> +   (name 'error/success)
> +   (extensions
> +    (list (service-extension boot-service-type
> +                             error/success-boot-gexp)))
> +   (default-value 42)

What are this 42 is for?


Otherwise look good to me, thank you!




  reply	other threads:[~2023-04-01 10:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-01  7:28 [bug#62584] [PATCH] services: Add error/success service type Ludovic Courtès
2023-04-01 10:34 ` 宋文武 via Guix-patches via [this message]
2023-04-01 16:51   ` Ludovic Courtès
2023-04-01 16:52   ` Ludovic Courtès
2023-04-02 13:32     ` Ludovic Courtès
2023-04-03  9:48       ` 宋文武 via Guix-patches via
2023-04-04 10:59       ` Simon Tournier
2023-04-27  3:53 ` Jakob Honal

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=87y1nbevqp.fsf@envs.net \
    --to=guix-patches@gnu.org \
    --cc=62584@debbugs.gnu.org \
    --cc=iyzsong@envs.net \
    --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.