[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#45146] [PATCH] scripts: substitute: Improve fetch-narinfos progress
[bug#45146] [PATCH] scripts: substitute: Improve fetch-narinfos progress reporting.
Wed, 24 Feb 2021 20:44:53 +0000
mu4e 1.4.14; emacs 27.1
Christopher Baines <firstname.lastname@example.org> writes:
> Ludovic Courtès <email@example.com> writes:
>> Christopher Baines <firstname.lastname@example.org> skribis:
>>> At least in guix weather, these changes make the progress bar actually
>>> * 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
>> 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.
> Maybe it's best to circle back to fixing guix weather after trying to
> restructure some of the guix substitute code.
> I've made an initial attempt at moving things around in . If the
> underlying code can live in a module, and then the substitute, weather
> and challenge scripts use that code with whatever UI stuff they want,
> maybe that will allow for better addressing this weather specific issue.
> 1: https://issues.guix.info/45409
I've sent a couple of updated patches for this. They're not particularly
dependent on the above work to create the (guix substitutes) module, but
I based the commits on that.
These commits make more careful changes, the substitute script behaviour
should remain the same.
Description: PGP signature
|[Prev in Thread]
||[Next in Thread]|
- [bug#45146] [PATCH] scripts: substitute: Improve fetch-narinfos progress reporting.,
Christopher Baines <=