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.
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.
* 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.
This should allow 'guix pull' to complete even when invoked from a Guix
that predates commit 5d669883ec.
* guix/ui.scm: Use #:hide instead of #:select. This is a followup to
5d669883ec.
* 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.
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.
The previous method would mess up with @example formatting, for
instance.
* guix/ui.scm (display-hint): Parameterize '%text-width' instead of
using 'fill-paragraph'.
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.
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.
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'.
* 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.
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.
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/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.
* 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.