all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Ricardo Wurmus <rekado@elephly.net>
Cc: guix-devel@gnu.org
Subject: Re: Guix swallows waiting messages
Date: Sat, 29 Sep 2018 18:41:47 +0200	[thread overview]
Message-ID: <87zhw0w910.fsf@gnu.org> (raw)
In-Reply-To: <87efdegly0.fsf@elephly.net> (Ricardo Wurmus's message of "Fri, 28 Sep 2018 08:44:55 +0200")

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

Hi Ricardo,

Ricardo Wurmus <rekado@elephly.net> skribis:

> I just reconfigured my system and upgraded packages at the same time.
> While “guix package -u” was building the latest Guix I noticed that
> “guix system” was awfully quiet.
>
> Turns out that it was waiting for the ongoing build of Guix to be
> finished, but instead of printing that message I would only see a
> stalled spinner.
>
> We may need to let some more daemon messages through the UI filter.

Oops, good catch!  What about the patch below?

Eventually I’d like to let the daemon optionally prefix what it sends to
clients so that they can tell whether it’s a daemon message or if it’s
build output, and in the latter case, to which job it corresponds.

Thanks,
Ludo’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1285 bytes --]

diff --git a/guix/status.scm b/guix/status.scm
index b19f0199d..c6956066f 100644
--- a/guix/status.scm
+++ b/guix/status.scm
@@ -383,14 +383,20 @@ addition to build events."
   actual hash:   ~a~%"))
              expected actual))
     (('build-log line)
-     ;; The daemon prefixes early messages coming with 'guix substitute' with
-     ;; "substitute:".  These are useful ("updating substitutes from URL"), so
-     ;; let them through.
-     (if (string-prefix? "substitute: " line)
-         (begin
+     ;; TODO: Better distinguish daemon messages and build log lines.
+     (cond ((string-prefix? "substitute: " line)
+            ;; The daemon prefixes early messages coming with 'guix
+            ;; substitute' with "substitute:".  These are useful ("updating
+            ;; substitutes from URL"), so let them through.
             (format port line)
             (force-output port))
-         (print-log-line line)))
+           ((string-prefix? "waiting for locks" line)
+            ;; This is when a derivation is already being built and we're just
+            ;; waiting for the build to complete.
+            (display (info (string-trim-right line)) port)
+            (newline))
+           (else
+            (print-log-line line))))
     (_
      event)))
 

  reply	other threads:[~2018-09-29 16:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-28  6:44 Guix swallows waiting messages Ricardo Wurmus
2018-09-29 16:41 ` Ludovic Courtès [this message]
2018-09-29 19:02   ` Ricardo Wurmus

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=87zhw0w910.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=rekado@elephly.net \
    /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.