all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Christopher Baines <mail@cbaines.net>
Cc: 45146@debbugs.gnu.org
Subject: [bug#45146] [PATCH] scripts: substitute: Improve fetch-narinfos progress reporting.
Date: Fri, 11 Dec 2020 19:01:36 +0100	[thread overview]
Message-ID: <87mtyk43y7.fsf@gnu.org> (raw)
In-Reply-To: <20201209185759.30937-1-mail@cbaines.net> (Christopher Baines's message of "Wed, 9 Dec 2020 18:57:59 +0000")

Hi,

Christopher Baines <mail@cbaines.net> skribis:

> At least in guix weather, these changes make the progress bar actually appear.
>
> * guix/scripts/substitute.scm (fetch-narinfos): Use (guix progress) for
> progress reporting.

Cool.  I noticed that something was wrong with ‘guix weather’, but I
suspected it had to do with the order in which the erase-line sequence
and \r are sent.

> -      (lambda ()
> -        (display "\r\x1b[K" (current-error-port)) ;erase current line
> -        (force-output (current-error-port))
> -        (format (current-error-port)
> -                (G_ "updating substitutes from '~a'... ~5,1f%")
> -                url (* 100. (/ done total)))
> -        (set! done (+ 1 done)))))
> +  (define fetch-narinfos-progress-reporter
> +    (progress-reporter/bar (length paths)))

The problem here is that we’d see a progress bar without knowing what it
represents.

Besides, currently output from ‘guix substitute’ is printed as is by
client commands, regardless of whether stdout is a tty.  The problem
already exists but it would become a bit more visible as logs get filled
with progress bars.

Ludo’.




  reply	other threads:[~2020-12-11 18:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-09 18:57 [bug#45146] [PATCH] scripts: substitute: Improve fetch-narinfos progress reporting Christopher Baines
2020-12-11 18:01 ` Ludovic Courtès [this message]
2020-12-24 17:26   ` Christopher Baines
2021-02-24 20:44     ` Christopher Baines
2021-03-09 20:29       ` bug#45146: " Christopher Baines
2021-02-24 20:34 ` [bug#45146] [PATCH 1/2] guix: substitutes: Make progress reporting configurable Christopher Baines
2021-02-24 20:34   ` [bug#45146] [PATCH 2/2] weather: Call lookup-narinfos with a custom progress reporter Christopher Baines

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mtyk43y7.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=45146@debbugs.gnu.org \
    --cc=mail@cbaines.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.