guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Guix swallows waiting messages


From: Ludovic Courtès
Subject: Re: Guix swallows waiting messages
Date: Sat, 29 Sep 2018 18:41:47 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hi Ricardo,

Ricardo Wurmus <address@hidden> 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’.

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 via email to

[Prev in Thread] Current Thread [Next in Thread]