From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: keep spinning even without new line Date: Sat, 05 Jan 2019 19:15:38 +0100 Message-ID: <87y37z0y45.fsf@gnu.org> References: <87muootkms.fsf@elephly.net> <87ef9zj24s.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggsout.gnu.org ([209.51.188.92]:60153 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gfqU6-0001qI-5t for guix-devel@gnu.org; Sat, 05 Jan 2019 13:15:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gfqU2-00037D-3j for guix-devel@gnu.org; Sat, 05 Jan 2019 13:15:46 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:51844) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gfqU1-00036Y-UB for guix-devel@gnu.org; Sat, 05 Jan 2019 13:15:42 -0500 In-Reply-To: <87ef9zj24s.fsf@elephly.net> (Ricardo Wurmus's message of "Sun, 30 Dec 2018 01:21:07 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ricardo Wurmus Cc: guix-devel@gnu.org Hi, Ricardo Wurmus skribis: > Ricardo Wurmus writes: > >> Hi Guix, >> >> when using =E2=80=9Cguix package -i=E2=80=9D the build log lines are rep= laced 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 =E2=80=9C(build-log > heartbeat)=E2=80=9D events, so that =E2=80=9Cprint-build-event=E2=80=9D i= n (guix status) only > needs to advance the spinner when the last event was a build-log event. > > Currently, events are produced only by =E2=80=9Cbuild-event-output-port= =E2=80=9D, which > generates them when processing build trace strings sent by the daemon. > I don=E2=80=99t really want to change the daemon to intersperse the actua= l build > output with heartbeat traces, so maybe a timer should generate these > events in =E2=80=9Cbuild-event-output-port=E2=80=9D or even earlier in = =E2=80=9Cprocess-stderr=E2=80=9D. > > =E2=80=9Cprocess-stderr=E2=80=9D is probably too low-level, and there=E2= =80=99s a chance that > injecting output there would corrupt the output sent by the daemon. I wonder if we could use Guile 2.2=E2=80=99s 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 =E2=80=98process-stderr=E2=80=99 and the caller in (guix status) maybe w= ould set a =E2=80=98current-read-waiter=E2=80=99. Thoughts? Ludo=E2=80=99.