summaryrefslogtreecommitdiff
path: root/guix/progress.scm
Commit message (Collapse)AuthorAge
* progress: Do not display the last 0B transfer when size is unknown.Clément Lassieur2018-11-16
| | | | | * guix/progress.scm (display-download-progress): Don't display anything when both SIZE and TRANSFERRED are null.
* progress: Fix crash because of division by zero.Clément Lassieur2018-11-16
| | | | | * guix/progress.scm (display-download-progress): Handle the case where SIZE is null.
* progress: Fix total size in "@ download-succeeded" traces.Ludovic Courtès2018-10-05
| | | | | | | | | | | | Fixes a regression introduced in 1d0be47ab680db938ac8da1ee65e1de91e198f67 whereby the total size for directories (coming from substitutes) would be 4KiB. This led the progress bar to go back to the start, typically. * guix/progress.scm (progress-reporter/trace): Add 'total'. In 'start', initialize it. Adjust 'report' to update it. Adjust 'stop' to prefer SIZE as the actual size and then TOTAL. Do not use the size of FILE as the total since that could be 4KiB when FILE is a directory.
* progress: Generate valid 'download-progress' traces when the size is unknown.Ludovic Courtès2018-10-04
| | | | | | | | | | Fixes <https://bugs.gnu.org/32895>. Reported by Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>. * guix/progress.scm (progress-reporter/trace): In 'stop', make sure SIZE is an integer. Previously we'd generate a "@ download-progress" trace with #f for the 'transferred' number when downloading files whose size is not known in advance.
* Add (guix status) and use it for pretty colored output.Ludovic Courtès2018-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/progress.scm (progress-reporter/trace): New procedure. (%progress-interval): New variable. (progress-reporter/file): Use it. * guix/scripts/build.scm (set-build-options-from-command-line): Pass #:print-extended-build-trace?. (%default-options): Add 'print-extended-build-trace?'. (guix-build): Parameterize CURRENT-TERMINAL-COLUMNS. Use 'build-status-updater'. * guix/scripts/environment.scm (%default-options): Add 'print-extended-build-trace?'. (guix-environment): Wrap body in 'with-status-report'. * guix/scripts/pack.scm (%default-options): Add 'print-build-trace?' and 'print-extended-build-trace?'. (guix-pack): Wrap body in 'with-status-report'. * guix/scripts/package.scm (%default-options, guix-package): Likewise. * guix/scripts/system.scm (%default-options, guix-system): Likewise. * guix/scripts/pull.scm (%default-options, guix-pull): Likewise. * guix/scripts/substitute.scm (progress-report-port): Don't call STOP when TOTAL is zero. (process-substitution): Add #:print-build-trace? and honor it. (guix-substitute)[print-build-trace?]: New variable. Pass #:print-build-trace? to 'process-substitution'. * guix/status.scm: New file. * guix/store.scm (set-build-options): Add #:print-extended-build-trace?; pass it into PAIRS. (%protocol-version): Bump. (protocol-version, nix-server-version): New procedures. (current-store-protocol-version): New variable. (with-store, build-things): Parameterize it. * guix/ui.scm (build-output-port): Remove. (colorize-string): Export. * po/guix/POTFILES.in: Add guix/status.scm. * tests/status.scm: New file. * Makefile.am (SCM_TESTS): Add it. * nix/libstore/worker-protocol.hh (PROTOCOL_VERSION): Bump to 0x162. * nix/libstore/build.cc (DerivationGoal::registerOutputs) (SubstitutionGoal::finished): Print a "@ hash-mismatch" trace before throwing.
* progress: Add 'display-download-progress'.Ludovic Courtès2018-09-27
| | | | | | * guix/progress.scm (display-download-progress): New procedure. (progress-reporter/file)[render]: Rewrite in terms of 'display-download-progress'.
* progress: 'progress-reporter-report!' takes any number of arguments.Ludovic Courtès2018-09-25
| | | | | * guix/progress.scm (progress-reporter-report!): Accept an arbitrary number of arguments and pass them to REPORT.
* progress: Rename 'erase-in-line' to 'erase-current-line'.Ludovic Courtès2017-12-15
| | | | | | | Suggested by Danny Milosavljevic <dannym@scratchpost.org>. * guix/progress.scm (erase-in-line): Rename to... (erase-current-line): ... this. Adjust callers.
* weather: Use (guix progress) for progress report.Ludovic Courtès2017-12-01
| | | | | | | | | * guix/progress.scm (start-progress-reporter!, stop-progress-reporter!) (progress-reporter-report!): New procedures. * guix/scripts/weather.scm (call-with-progress-reporter): New procedure. (package-outputs)[update-progress!]: Remove. Use 'call-with-progress-reporter' instead. (guix-weather): Parameterize 'current-terminal-columns'.
* progress: Add 'progress-reporter/bar'.Ludovic Courtès2017-12-01
| | | | * guix/progress.scm (progress-reporter/bar): New procedure.
* progress: 'progress-bar' accounts for brackets.Ludovic Courtès2017-12-01
| | | | | * guix/progress.scm (progress-bar): Subtract 2 to BAR-WIDTH to account for brackets.
* progress: Factorize erase-in-line.Ludovic Courtès2017-12-01
| | | | | * guix/progress.scm (erase-in-line): New procedure. (progress-reporter/file): Use it.
* Add (guix progress).Ludovic Courtès2017-10-19
Among other things, this removes (guix utils), (guix ui), (guix config), etc. from the closure of (guix build download), as was the case since 798648515b77507c242752457b4dc17c155bad6e. * guix/utils.scm (<progress-reporter>, call-with-progress-reporter): Move to... * guix/progress.scm: ... here. New file. * Makefile.am (MODULES): Add it. * guix/build/download.scm (current-terminal-columns) (nearest-exact-integer, duration->seconds, seconds->string) (byte-count->string, progress-bar, string-pad-middle) (rate-limited, progress-reporter/file, dump-port*) (time-monotonic): Move to progress.scm. * guix/scripts/download.scm: Adjust accordingly. * guix/scripts/substitute.scm: Likewise.