unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* keep spinning even without new line
@ 2018-12-29 15:31 Ricardo Wurmus
  2018-12-30  0:21 ` Ricardo Wurmus
  2018-12-30  2:57 ` Vagrant Cascadian
  0 siblings, 2 replies; 5+ messages in thread
From: Ricardo Wurmus @ 2018-12-29 15:31 UTC (permalink / raw)
  To: guix-devel

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?

-- 
Ricardo

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

* Re: keep spinning even without new line
  2018-12-29 15:31 keep spinning even without new line Ricardo Wurmus
@ 2018-12-30  0:21 ` Ricardo Wurmus
  2019-01-05 18:15   ` Ludovic Courtès
  2018-12-30  2:57 ` Vagrant Cascadian
  1 sibling, 1 reply; 5+ messages in thread
From: Ricardo Wurmus @ 2018-12-30  0:21 UTC (permalink / raw)
  To: guix-devel


Ricardo Wurmus <rekado@elephly.net> 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.

Any better ideas?

--
Ricardo

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

* Re: keep spinning even without new line
  2018-12-29 15:31 keep spinning even without new line Ricardo Wurmus
  2018-12-30  0:21 ` Ricardo Wurmus
@ 2018-12-30  2:57 ` Vagrant Cascadian
  2018-12-30  6:25   ` Ricardo Wurmus
  1 sibling, 1 reply; 5+ messages in thread
From: Vagrant Cascadian @ 2018-12-30  2:57 UTC (permalink / raw)
  To: guix-devel

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

On 2018-12-29, Ricardo Wurmus wrote:
> 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?

Are you proposing that the spinner spins even when there's no indication
that anything is actually happening? Or is there some source of
information other than the build log output?

It could spin multiple times for each line, and space them out over
time... (multiple lines in the same time-window might only spin X number
of times)

To me, it would make sense that the spinner should stop spinning if the
build is stuck or just not very active... otherwise, it's not providing
useful information to the person watching...


live well,
  vagrant

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

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

* Re: keep spinning even without new line
  2018-12-30  2:57 ` Vagrant Cascadian
@ 2018-12-30  6:25   ` Ricardo Wurmus
  0 siblings, 0 replies; 5+ messages in thread
From: Ricardo Wurmus @ 2018-12-30  6:25 UTC (permalink / raw)
  To: Vagrant Cascadian; +Cc: guix-devel


Hi Vagrant,

> On 2018-12-29, Ricardo Wurmus wrote:
>> 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?
>
> Are you proposing that the spinner spins even when there's no indication
> that anything is actually happening? Or is there some source of
> information other than the build log output?

The build log is all we’ve got.  I do propose to spin even when no new
line has been produced.

> To me, it would make sense that the spinner should stop spinning if the
> build is stuck or just not very active... otherwise, it's not providing
> useful information to the person watching...

It is providing useful information, namely that Guix itself is still
running and not stuck.  It shows that the build is still going on, even
if the build consisted of “sleep 100000” statements :)

Guix eventually aborts the build after a certain amount of silence.
Since the last line that is printed and the timeout all a user of “guix
package -i” sees is a stuck spinner; a user of “guix build” will at
least see the last lines of build output and can guess what this means
for expected delays.

My goal is to provide assurances to the user of “guix package -i” that
Guix is not “stuck”, to remove the doubt that a long uncommunicative
build can bring.  (People who want to know details would increase
verbosity anyway.)  Spinning while Guix is waiting for build output from
the daemon seems like a good way to accomplish that to me.

--
Ricardo

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

* Re: keep spinning even without new line
  2018-12-30  0:21 ` Ricardo Wurmus
@ 2019-01-05 18:15   ` Ludovic Courtès
  0 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2019-01-05 18:15 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

Hi,

Ricardo Wurmus <rekado@elephly.net> skribis:

> Ricardo Wurmus <rekado@elephly.net> 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
‘current-read-waiter’.

Thoughts?

Ludo’.

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

end of thread, other threads:[~2019-01-05 18:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-29 15:31 keep spinning even without new line Ricardo Wurmus
2018-12-30  0:21 ` Ricardo Wurmus
2019-01-05 18:15   ` Ludovic Courtès
2018-12-30  2:57 ` Vagrant Cascadian
2018-12-30  6:25   ` 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).