[Top][All Lists]

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

Re: keep spinning even without new line

From: Ludovic Courtès
Subject: Re: keep spinning even without new line
Date: Sat, 05 Jan 2019 19:15:38 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)


Ricardo Wurmus <address@hidden> skribis:

> Ricardo Wurmus <address@hidden> writes:
>> Hi Guix,
>> when using “guix package -i” the build log lines are replaced with a
>> spinner character.  In some cases, the build log does not produce new
>> lines for a long time, so that the spinner appears to be stuck.
>> What do you think of advancing the spinner even when the build log is
>> not verbose enough to trigger the display of the next character?  How
>> can this be accomplished?
> One way to accomplish this is to generate periodic “(build-log
> heartbeat)” events, so that “print-build-event” in (guix status) only
> needs to advance the spinner when the last event was a build-log event.
> Currently, events are produced only by “build-event-output-port”, which
> generates them when processing build trace strings sent by the daemon.
> I don’t really want to change the daemon to intersperse the actual build
> output with heartbeat traces, so maybe a timer should generate these
> events in “build-event-output-port” or even earlier in “process-stderr”.
> “process-stderr” is probably too low-level, and there’s a chance that
> injecting output there would corrupt the output sent by the daemon.

I wonder if we could use Guile 2.2’s suspendable ports to deal with this
case (info "(guile) Non-Blocking I/O").  To avoid global effects, I
think we could explicitly use the (ice-9 suspendable-ports) procedures
in ‘process-stderr’ and the caller in (guix status) maybe would set a



reply via email to

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