summaryrefslogtreecommitdiff
path: root/guix/ui.scm
Commit message (Collapse)AuthorAge
* 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.
* ui: 'show-what-to-build' warns when we don't have enough disk space.Ludovic Courtès2017-06-02
| | | | | | * guix/ui.scm (check-available-space): New procedure. (show-what-to-build): Compute 'installed-size' and call 'check-available-space'.
* ui: 'show-what-to-build' displays how much will be downloaded.Ludovic Courtès2017-06-02
| | | | | | * guix/ui.scm (show-what-to-build)[download-size] [display-download-size?]: New variables. Add cases for when DISPLAY-DOWNLOAD-SIZE? is true.
* derivations: 'derivation-prerequisites-to-build' returns <substitutable>.Ludovic Courtès2017-06-02
| | | | | | | | | | | | | | | | * guix/derivations.scm (derivation-prerequisites-to-build): Rename #:substitutable? to #:substitutable-info. [derivation-substitutable?]: Rename to... [derivation-substitutable-info]: ... this. Return a list of <substitutable>. Second return value is now a list of <substitutable> instead of a list of strings. * guix/ui.scm (show-what-to-build)[substitutable?]: Rename to... [substitutable-info]: ... this. Adjust to new 'derivation-prerequisites-to-build' return value type. * tests/derivations.scm ("derivation-prerequisites-to-build and substitutes"): Adjust. ("derivation-prerequisites-to-build and substitutes, local build"): Likewise.
* ui: Disable Guile deprecation warnings by default.Ludovic Courtès2017-05-16
| | | | | * guix/ui.scm (initialize-guix): Call (debug-disable 'warn-deprecated) when "GUILE_WARN_DEPRECATED" is not set.
* scripts: Do not create the config directory.Ludovic Courtès2017-05-13
| | | | | | | | | This fixes runs of 'guix package' and 'guix system' tests in environments where $HOME is read-only. * guix/ui.scm (config-directory): Add #:ensure? parameter and honor it. * guix/scripts.scm (warn-about-old-distro): Pass #:ensure? #f to 'config-directory'.
* ui: 'string->duration' correctly handles hours.Ludovic Courtès2017-05-10
| | | | | * guix/ui.scm (string->duration): Add missing '=>' for hours. * tests/ui.scm ("duration, 2 hours"): New test.
* ui: Rename '_' to 'G_'.Ludovic Courtès2017-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids collisions with '_' when the latter is used as a 'match' pattern for instance. See <https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>. * guix/ui.scm: Rename '_' to 'G_'. * po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly. * build-aux/compile-all.scm (warnings): Remove 'format'. * gnu/packages.scm, gnu/services.scm, gnu/services/shepherd.scm, gnu/system.scm, gnu/system/shadow.scm, guix/gnupg.scm, guix/http-client.scm, guix/import/cpan.scm, guix/import/elpa.scm, guix/import/pypi.scm, guix/nar.scm, guix/scripts.scm, guix/scripts/archive.scm, guix/scripts/authenticate.scm, guix/scripts/build.scm, guix/scripts/challenge.scm, guix/scripts/container.scm, guix/scripts/container/exec.scm, guix/scripts/copy.scm, guix/scripts/download.scm, guix/scripts/edit.scm, guix/scripts/environment.scm, guix/scripts/gc.scm, guix/scripts/graph.scm, guix/scripts/hash.scm, guix/scripts/import.scm, guix/scripts/import/cpan.scm, guix/scripts/import/cran.scm, guix/scripts/import/crate.scm, guix/scripts/import/elpa.scm, guix/scripts/import/gem.scm, guix/scripts/import/gnu.scm, guix/scripts/import/hackage.scm, guix/scripts/import/nix.scm, guix/scripts/import/pypi.scm, guix/scripts/import/stackage.scm, guix/scripts/lint.scm, guix/scripts/offload.scm, guix/scripts/pack.scm, guix/scripts/package.scm, guix/scripts/perform-download.scm, guix/scripts/publish.scm, guix/scripts/pull.scm, guix/scripts/refresh.scm, guix/scripts/size.scm, guix/scripts/substitute.scm, guix/scripts/system.scm, guix/ssh.scm, guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
* ui: Gracefully report '&message' conditions.Ludovic Courtès2017-04-16
| | | | | * guix/ui.scm (report-load-error, warn-about-load-error) (read/eval): Add special-case for SRFI-35 &message conditions.
* gexp: 'lower-object' raises an exception when passed an invalid object.Ludovic Courtès2017-04-04
| | | | | | | * guix/gexp.scm (&gexp-error, &gexp-input-error): New error conditions. (lower-object): Raise &gexp-input-error when 'lookup-compiler' returns #f. * tests/gexp.scm ("lower-object & gexp-input-error?"): New test. * guix/ui.scm (call-with-error-handling): Add case for 'gexp-input-error?'.
* ui: Support Texinfo markup in package synopses.Alex Kost2017-03-27
| | | | | | | | | | | | * guix/ui.scm (package-field-string): New procedure. (package-description-string): Use it. (package-synopsis-string): New procedure. (package->recutils): Use it. * guix/scripts/lint.scm (check-synopsis-style)[check-texinfo-markup]: New procedure. Use it in checks. * tests/lint.scm: Test it. * gnu/packages/perl.scm (perl-try-tiny)[synopsis]: Adjust for the Texinfo markup.
* ui: Don't use '%default-port-encoding' to set the encoding of string ports.Ludovic Courtès2017-03-08
| | | | | | | | * guix/ui.scm (right-arrow): Call 'set-port-encoding!' to set PORT's encoding; remove use of 'with-fluids'. This is for compatibility with Guile 2.2 where the encoding of string ports is not influenced by %DEFAULT-PORT-ENCODING. * tests/ui.scm ("show-manifest-transaction"): Likewise.
* ui: Avoid '_' as a pattern variable in 'match'.Ludovic Courtès2017-03-08
| | | | | | * guix/ui.scm (fill-paragraph): Don't use '_' as a pattern variable since that is shadowed by the top-level '_' binding on Guile 2.2. (show-manifest-transaction): Likewise.
* ui: Wrap 'canonicalize-path' for better error reporting.Ludovic Courtès2017-01-13
| | | | | | Reported by Christopher Baines. * guix/ui.scm (canonicalize-path): New procedure.
* ui: Factorize error-reporting wrapper code.Ludovic Courtès2017-01-13
| | | | | | * guix/ui.scm (augmented-system-error-handler): New procedure. (error-reporting-wrapper): New macro. (symlink, copy-file): Define using 'error-reporting-wrapper'.
* ui: Keep the word "Copyright" untranslated.Ludovic Courtès2017-01-02
| | | | | | | Suggested by John Darrington <john@darrington.wattle.id.au>. * guix/ui.scm (show-version-and-exit): Make "Copyright (C) 2017" untranslatable, except "(C)" itself, like Gnulib's version-etc does.
* ui: It's 2017 now!Ludovic Courtès2017-01-01
| | | | * guix/ui.scm (show-version-and-exit): Change year to 2017.
* guix package: Display newline after generation diffs.Roel Janssen2016-11-17
| | | | * guix/ui.scm (display-profile-content-diff): Display an extra newline.
* daemon: Add "builtin:download" derivation builder.Ludovic Courtès2016-11-16
| | | | | | | | | | | | | | | | | | | | | | | | | | This ensures that 1) the derivation doesn't change when Guix changes; 2) the derivation closure doesn't contain Guix and its dependencies; 3) we don't have to rely on ugly chroot hacks. Adapted from Nix commit 0a2bee307b20411f5b0dda0c662b1f9bb9e0e131. * nix/libstore/build.cc (DerivationGoal::runChild): Add special case for 'isBuiltin(drv)'. Disable chroot when 'isBuiltin(drv)'. * nix/libstore/builtins.cc, nix/libstore/builtins.hh, nix/scripts/download.in, guix/scripts/perform-download.scm: New files. * guix/ui.scm (show-guix-help)[internal?]: Add 'perform-download'. * nix/local.mk (libstore_a_SOURCES): Add builtins.cc. (libstore_headers): Add builtins.hh. (nodist_pkglibexec_SCRIPTS): Add 'scripts/download'. * config-daemon.ac: Emit 'scripts/download'. * Makefile.am (MODULES): Add 'guix/scripts/perform-download.scm'. * tests/derivations.scm ("unknown built-in builder") ("'download' built-in builder") ("'download' built-in builder, invalid hash") ("'download' built-in builder, not found") ("'download' built-in builder, not fixed-output"): New tests. Co-authored-by: Eelco Dolstra <eelco.dolstra@logicblox.com>
* guix package: Display generation diffs.Roel Janssen2016-10-26
| | | | | | | * guix/ui.scm (display-profile-content-diff): New variable. * guix/scripts/package.scm (process-query): Use display-profile-content-diff. In collaboration with Benz Schenk.
* ui: Do not shadow '_' where it's used as a literal syntax match.Ludovic Courtès2016-09-20
| | | | | | | | | | | | | | | | | | Fixes compilation with Guile 2.1. Reported by Mu Lei. * guix/ui.scm (report-load-error) (warn-about-load-error, read/eval-package-expression): Use 'rest' instead of '_' as the pattern variable name. * gnu/packages.scm (%find-package): Likewise. * guix/scripts/build.scm (transform-package-inputs): Likewise. * guix/scripts/hash.scm (guix-hash): Likewise. * guix/scripts/import/gnu.scm (%options, guix-import-gnu): Likewise. * guix/scripts/import/nix.scm (guix-import-nix): Likewise. * guix/scripts/offload.scm (build-machines): Likewise. * guix/scripts/refresh.scm (%options): Likewise. * guix/scripts/substitute.scm (narinfo-signature->canonical-sexp): Likewise.
* ui: Initialize %FILE-PORT-NAME-CANONICALIZATION to #f.Ludovic Courtès2016-09-05
| | | | | | | | | | This avoids loads of needless 'stat' calls due to the default 'relative setting and the 'canonicalize-path' calls it leads to. This was especially visible when 'guix substitute' access files in /var/guix/substitute/cache. * guix/ui.scm (run-guix-command): Set %FILE-PORT-NAME-CANONICALIZATION to #f.
* ui: Remove dependency on (gnu system file-systems).Ludovic Courtès2016-08-04
| | | | | | * guix/ui.scm (specification->file-system-mapping): Move to... * gnu/system/file-systems.scm (specification->file-system-mapping): ... here.
* ui: 'string->duration' supports hours and seconds.Ludovic Courtès2016-06-09
| | | | | * guix/ui.scm (string->duration): Add seconds and hours. * tests/ui.scm ("duration, 1 second"): New test.
* ui: Let users report translation bugs.Mathieu Lirzin2016-05-24
| | | | | * guix/ui.scm (show-bug-report-information): Add a comment for translators.
* utils: Move combinators to (guix combinators).Ludovic Courtès2016-05-04
| | | | | | | | | | | | | | | | | | | * guix/utils.scm (compile-time-value, memoize, fold2) (fold-tree, fold-tree-leaves): Move to... * guix/combinators: ... here. New file. * tests/utils.scm ("fold2, 1 list", "fold2, 2 lists") (fold-tree tests): Move to... * tests/combinators.scm: ... here. New file. * Makefile.am (MODULES, SCM_TESTS): Add them. * gnu/packages.scm, gnu/packages/bootstrap.scm, gnu/services/herd.scm, guix/build-system/gnu.scm, guix/build-system/python.scm, guix/derivations.scm, guix/gnu-maintenance.scm, guix/import/elpa.scm, guix/scripts/archive.scm, guix/scripts/build.scm, guix/scripts/graph.scm, guix/scripts/lint.scm, guix/scripts/size.scm, guix/scripts/substitute.scm, guix/serialization.scm, guix/store.scm, guix/ui.scm: Adjust imports accordingly.
* ui: Use 'terminal-columns'.Ludovic Courtès2016-04-15
| | | | * guix/ui.scm (%text-width): Default to (terminal-columns).
* ui: 'package->recutils' accurately honors the number of columns.Ludovic Courtès2016-04-15
| | | | | * guix/ui.scm (package->recutils)[width*]: New variable. Use it instead of WIDTH.
* ui: Add comment on the translation of "current".Ludovic Courtès2016-03-30
| | | | * guix/ui.scm (display-generation): Add "TRANSLATORS" comment.