summaryrefslogtreecommitdiff
path: root/guix/ui.scm
Commit message (Collapse)AuthorAge
* ui: Report profile hooks separately.Ricardo Wurmus2018-12-19
| | | | | | | | | | | | * guix/ui.scm (profile-hook-derivation?): New procedure. (show-what-to-build): Distinguish among BUILD derivations that match 'profile-hook-derivation?'. Report them separately. * guix/status.scm (hook-message): New procedure. (print-build-event): Display profile hooks with readable hook name. * guix/profiles.scm (info-dir-file, ghc-package-cache-file, ca-certificate-bundle, glib-schemas, gtk-icon-themes, gtk-im-modules, xdg-desktop-database, xdg-mime-database, fonts-dir-file, manual-database): Augment derivation with "type" and "hook" properties.
* ui: Report file names in 'system-error' exceptions from 'execlp'.Timothy Sample2018-12-18
| | | | | | | | | Fixes <https://bugs.gnu.org/33755>. * guix/ui.scm (apply-formals): New macro. (execlp): New error-reporting wrapper. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* ui: 'show-what-to-build' reports grafts separately.Ludovic Courtès2018-11-28
| | | | | | * guix/ui.scm (graft-derivation?): New procedure. (show-what-to-build): Distinguish among BUILD derivations that match 'graft-derivation?'. Report them separately.
* 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.
* ui: Do not filter hash mismatch lines.Ricardo Wurmus2018-09-11
| | | | | | | Reported by Pjotr Prins <pjotr.public12@thebird.nl>. * guix/ui.scm (build-output-port): Add pattern for hash mismatch error; be more careful with error messages in verbose mode.
* ui: Add soft port for styling and filtering build output.Ricardo Wurmus2018-09-09
| | | | | | | | | * guix/ui.scm (build-output-port): New procedure. * guix/scripts/package.scm (%default-options): Print build trace. (guix-package): Use build-output-port. * guix/scripts/build.scm (guix-build): Use build-output-port. Co-authored-by: Sahithi Yarlagadda <sahi@swecha.net>
* ui: Add support for colorization.Sahithi Yarlagadda2018-09-09
| | | | | | | * guix/ui.scm (ansi-color-tables): New variable. (color, colorize-string): New procedures. Signed-off-by: Ricardo Wurmus <rekado@elephly.net>
* ui: Fix typo.Ludovic Courtès2018-07-11
| | | | * guix/ui.scm (display-profile-content-diff): Fix typo in docstring.
* ui: Add -V as short option for --version.Kyle Meyer2018-07-07
| | | | | | | * guix/ui.scm (run-guix): Add -V as the short option for --version for consistency with most commands. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* ui: Report file names in 'system-error' exceptions from 'delete-file'.Ludovic Courtès2018-07-03
| | | | * guix/ui.scm (delete-file): New error-reporting wrapper.
* ui: Make 'check-available-space' public.Ludovic Courtès2018-07-03
| | | | | * guix/ui.scm (check-available-space): Add optional 'directory' parameter, defaulting to (%store-prefix). Honor it. Make public.
* ui: Increase relevance score for exact matches.Ludovic Courtès2018-06-29
| | | | | | | | | | | | | | | Previously "guix package -s python" would have 'python2-zope-interface' as its first result (relevance: 10), followed by many other python-* packages with the same score, while 'python' itself would come later (relevance: 7). This change makes 'python' the first result (relevance: 27). Reported by Gábor Boskovits. * guix/ui.scm (relevance)[score]: Use 'fold-matches' instead of 'match:count' to counter the number of maches. Give more weight to exact matches.
* ui: Hint at the installation of locale packages and 'GUIX_LOCPATH'.Ludovic Courtès2018-06-27
| | | | | | * guix/ui.scm (install-locale): Hide the "warning: failed to install locale" on Guile 2.2. Add a hint about 'glibc-utf8-locales' and 'GUIX_LOCPATH'.
* guix: ui: Allow translation of dates.Julien Lepiller2018-06-14
| | | | | | * guix/ui.scm (display-generation): Allow translation of dates. The format string will show dates as month day year, but some languages use a different convention.
* ui: Avoid #:select'ing bindings introduced in the latest (guix build utils).Ludovic Courtès2018-06-09
| | | | | | | | This should allow 'guix pull' to complete even when invoked from a Guix that predates commit 5d669883ecc104403c5d3ba7d172e9c02234577c. * guix/ui.scm: Use #:hide instead of #:select. This is a followup to 5d669883ecc104403c5d3ba7d172e9c02234577c.
* Merge branch 'master' into core-updatesMarius Bakke2018-05-06
|\
| * guix build: Nicely report unbound variables with hints.Ludovic Courtès2018-05-04
| | | | | | | | | | | | | | | | | | | | | | | | | | * guix/ui.scm (print-unbound-variable-error): Add "error:" to the message. (report-unbound-variable-error): New procedure, with code formerly in 'report-load-error'. (report-load-error): Use it. (call-with-unbound-variable-handling): New procedure. (with-unbound-variable-handling): New macro. * guix/scripts/build.scm (options->derivations): Wrap body in 'with-unbound-variable-handling'. * tests/guix-build.sh (GUIX_PACKAGE_PATH): Add test.
| * ui: Factorize 'last-frame-with-source'.Ludovic Courtès2018-05-04
| | | | | | | | | | | | * guix/ui.scm (last-frame-with-source): New procedure. (load*)[frame-with-source]: Remove. Use 'last-frame-with-source'.
* | Merge branch 'master' into core-updatesMark H Weaver2018-04-30
|\|
| * guix system: Report wrong file system 'device' fields.Ludovic Courtès2018-04-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, if you wrote (device "my-label") without (title 'label), you'd get: guix system: error: stat: No such file or directory: "my-label" Now you get a proper error and a hint. Reported by Pierre-Antoine Rouby. * guix/scripts/system.scm (check-file-system-availability)[literal]: New variable. Loop over LITERAL. * gnu/system/file-systems.scm (%pseudo-file-system-types): New variable. * guix/ui.scm (display-hint): Make public.
* | utils: invoke: Raise exceptions using SRFI-34 and SRFI-35.Mark H Weaver2018-03-16
|/ | | | | | | | | | * guix/build/utils.scm (&invoke-error): New condition type. (invoke-error?, invoke-error-program, invoke-error-arguments) (invoke-error-exit-status, invoke-error-term-signal) (invoke-error-stop-signal): New exported procedures. (invoke): Raise exceptions using SRFI-34 and SRFI-35. * guix/ui.scm (call-with-error-handling): Add a guard clause for &invoke-error conditions.
* ui: 'display-hint' preserves Texinfo formatting.Ludovic Courtès2018-03-07
| | | | | | | | The previous method would mess up with @example formatting, for instance. * guix/ui.scm (display-hint): Parameterize '%text-width' instead of using 'fill-paragraph'.
* ui: Display fix hints in the case where we have location info.Ludovic Courtès2018-03-07
| | | | | * guix/ui.scm (call-with-error-handling): Display fix-hints in the error + message case.
* ui: 'load*' no longer fails on Guile 2.2.3 upon EACCES or similar.Ludovic Courtès2018-03-06
| | | | | | | | | | | | | | Previously, if ~/.cache was not write-accessible, 'guix' would exit with code 1 without printing any message. That was because the 'make-stack' call would fail since the exception (a 'system-error) came from 'compile-file', which was called at a point where TAG wasn't installed yet. Secondly, to mimick auto-compilation behavior, we just swallow 'system-error raised by 'compile-file'. Reported by Clément Lassieur. * guix/ui.scm (load*): Move 'compile-file' call in the dynamic extent of TAG. Catch 'system-error around it and ignore it.
* ui: Better workaround for lack of '%fresh-auto-compile' on 2.2.3.Ludovic Courtès2018-03-05
| | | | | | Fixes <https://bugs.gnu.org/29226> for the most part. * guix/ui.scm (load*): Add call to 'compile-file' on 2.2.3.
* ui: Disable '%fresh-auto-compile' only for Guile 2.2.3.Ludovic Courtès2018-01-15
| | | | | | | Mitigates <https://bugs.gnu.org/29881>. Reported by Diego Nicola Barbato <dnbarbato@posteo.de>. * guix/ui.scm (load*): Unset '%fresh-auto-compile' only on Guile 2.2.3.
* ui: Display hints that come along with '&message' conditions.Ludovic Courtès2018-01-07
| | | | | * guix/ui.scm (call-with-error-handling): Add case for message and fix-hint?.
* ui: It's 2018 now!Ludovic Courtès2018-01-01
| | | | * guix/ui.scm (show-version-and-exit): Change year to 2018.
* ui: Non-zero exit for compound '&message' and '&error-location' conditions.Ludovic Courtès2017-12-18
| | | | | * guix/ui.scm (call-with-error-handling): When both 'message?' and 'error-location?' are true, add call to 'exit'.
* ui: Display hints to resolve profile collisions.Ludovic Courtès2017-12-10
| | | | | | | | Fixes <https://bugs.gnu.org/29255>. Reported by Ben Sturmfels <ben@sturm.com.au>. * guix/ui.scm (display-collision-resolution-hint): New procedure. (call-with-error-handling): Call it upon '&profile-collistion-error'.
* ui: Tweak conflicting profile entry error message.Ludovic Courtès2017-12-03
| | | | | * guix/ui.scm (call-with-error-handling): Use 'manifest-entry-output*' when reporting conflicting profile entries.
* Do not set '%fresh-auto-compile'.Ludovic Courtès2017-12-01
| | | | | | | | * guix/scripts/offload.scm (build-machines): Comment out '(set! %fresh-auto-compile #t)' since with Guile 2.2.3 it could lead to an actual rebuild of everything that gets loaded from there on. See <https://bugs.gnu.org/29226>. * guix/ui.scm (load*): Likewise.
* ui: Present 'use-modules' hints with a question mark.Ludovic Courtès2017-11-30
| | | | | | | Suggested by myglc2 <myglc2@gmail.com>. * guix/ui.scm (report-load-error): Write "Did you forget" rather than "Try adding."
* ui: Avoid "pkg:out" syntax when reporting collisions.Ludovic Courtès2017-11-28
| | | | | * guix/ui.scm (call-with-error-handling)[manifest-entry-output*]: New procedure. Use it when reporting collisions.
* ui: 'known-variable-definition' protects against module cycles.Ludovic Courtès2017-11-24
| | | | | | | | Fixes <https://bugs.gnu.org/29358>. Reported by Marius Bakke <mbakke@fastmail.com>. * guix/ui.scm (known-variable-definition): Add 'visited' set to guard against cycles on 2.0.
* ui: Add source file name to the package search metrics.Ludovic Courtès2017-11-16
| | | | | * guix/ui.scm (%package-metrics): Include 'package-location'. Increase score of the other fields.
* ui: Add an 'unbound-variable' exception printer.Ludovic Courtès2017-11-09
| | | | | * guix/ui.scm (print-unbound-variable-error): New variable. Use it as the 'unbound-variable' printer.
* ui: Provide hints for unbound-variable errors.Ludovic Courtès2017-11-09
| | | | | * guix/ui.scm (known-variable-definition): New procedure. (report-load-error): Handle 'unbound-variable'.
* ui: Add 'display-hint'.Ludovic Courtès2017-11-09
| | | | | * guix/ui.scm (known-variable-definition): New procedure. (report-load-error): Use it.
* ui: Define and honor '&error-location' and '&fix-hint' conditions.Ludovic Courtès2017-11-08
| | | | | | * guix/utils.scm (&error-location, &fix-hint): New condition types. * guix/ui.scm (report-load-error): Handle them. (call-with-error-handling): Honor '&error-location'.
* ui: Introduce (guix i18n).Ludovic Courtès2017-11-08
| | | | | | * guix/ui.scm (G_, N_, _P, %gettext-domain, %package-text-domain): Move to... * guix/i18n.scm: ... here. New file.
* ui: Improve reporting of missing closing parentheses.Ludovic Courtès2017-10-10
| | | | | | | | Suggested by Ricardo Wurmus. Works around <https://bugs.gnu.org/28295>. * guix/ui.scm (report-load-error): Add case for 'read-error'. * tests/guix-system.sh: Test missing-closing-paren errors.
* guix system: Add 'search' command.Ludovic Courtès2017-09-16
| | | | | | | | | | | | | | * guix/scripts/system.scm (resolve-subcommand): New procedure. (process-command): Handle 'search'. (guix-system): Likewise. (show-help): Augment. * guix/scripts/system/search.scm: New file. * po/guix/POTFILES.in: Add it. * Makefile.am (MODULES): Add it. * guix/ui.scm (%text-width): Export. * doc/guix.texi (Invoking guix system): Document it. (Service Types and Services): Mention 'guix system search'. * tests/guix-system.sh: Test it.
* ui: Generalize relevance computation.Ludovic Courtès2017-09-16
| | | | | | | * guix/ui.scm (relevance, package-relevance): New procedures. (%package-metrics): New variable. * guix/scripts/package.scm (find-packages-by-description)[score] [package-score]: Remove. Use 'package-relevance' instead.
* utils: Factorize XDG directory handling.Ludovic Courtès2017-07-28
| | | | | | | | * guix/ui.scm (config-directory): Remove. * guix/utils.scm (xdg-directory, config-directory): New procedures. (cache-directory): Rewrite in terms of 'xdg-directory'. * guix/scripts/substitute.scm (%narinfo-cache-directory): Pass #:ensure? #f to 'cache-directory'.
* ui: package->recutlis: Remove duplicated package names in dependencies.宋文武2017-07-02
| | | | | * guix/ui.scm (package->recutils): Add call to 'delete-duplicates' in 'dependencies->recutils'.
* profiles: Catch and report collisions in the profile.Ludovic Courtès2017-06-21
| | | | | | | | | | * guix/profiles.scm (&profile-collision-error): New error condition. (manifest-transitive-entries, manifest-entry-lookup, lower-manifest-entry) (check-for-collisions): New procedures. (profile-derivation): Add call to 'check-for-collisions'. * guix/ui.scm (call-with-error-handling): Handle '&profile-collision-error'. * tests/profiles.scm ("collision", "collision of propagated inputs") ("no collision"): New tests.
* store: Add an RPC counter.Ludovic Courtès2017-06-16
| | | | | | | | * guix/store.scm (%rpc-calls): New variable. (show-rpc-profile, record-operation): New procedures. (operation): Add call to 'record-operation'. * guix/ui.scm (run-guix-command): Wrap COMMAND-MAIN in 'dynamic-wind'. Run EXIT-HOOK.
* ui: Remove the empty string from '%load-extensions'.Ludovic Courtès2017-06-15
| | | | * guix/ui.scm (run-guix): Set %LOAD-EXTENSIONS.
* ui: 'package->recutils' takes #:extra-fields.Ludovic Courtès2017-06-13
| | | | * guix/ui.scm (package->recutils): Add #:extra-fields and honor it.