unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Guix swallows waiting messages
@ 2018-09-28  6:44 Ricardo Wurmus
  2018-09-29 16:41 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Ricardo Wurmus @ 2018-09-28  6:44 UTC (permalink / raw)
  To: guix-devel

Hi,

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.

--
Ricardo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Guix swallows waiting messages
  2018-09-28  6:44 Guix swallows waiting messages Ricardo Wurmus
@ 2018-09-29 16:41 ` Ludovic Courtès
  2018-09-29 19:02   ` Ricardo Wurmus
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2018-09-29 16:41 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

[-- 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)))
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: Guix swallows waiting messages
  2018-09-29 16:41 ` Ludovic Courtès
@ 2018-09-29 19:02   ` Ricardo Wurmus
  0 siblings, 0 replies; 3+ messages in thread
From: Ricardo Wurmus @ 2018-09-29 19:02 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel


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

> 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?

Looks good to me.  Thanks!

> 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.

Yes, that would be good.

-- 
Ricardo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-09-29 22:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-28  6:44 Guix swallows waiting messages Ricardo Wurmus
2018-09-29 16:41 ` Ludovic Courtès
2018-09-29 19:02   ` Ricardo Wurmus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).