summaryrefslogtreecommitdiff
path: root/guix/diagnostics.scm
Commit message (Collapse)AuthorAge
* diagnostics, ui: Adjust to 'read-error' and 'syntax-error' in Guile 3.0.6.Ludovic Courtès2021-04-29
| | | | | | | | | | | | | * guix/diagnostics.scm (source-properties->location): Add clause for vectors. * guix/ui.scm (report-load-error): Tweak 'read-error' handling for 3.0.6. * tests/guix-package.sh: Relax regexp for the "unbound variable" diagnostic check. * tests/guix-system.sh: Adjust "missing closing paren" check for 3.0.6. * tests/records.scm (location-alist): New procedure. ("define-record-type* & wrong field specifier") ("define-record-type* & wrong field specifier, identifier") ("define-record-type* & duplicate initializers"): Use it.
* diagnostics: Add '&formatted-message'.Ludovic Courtès2020-07-25
| | | | | | | | | | | | | | This allows 'gettext' to be called on the format string at the site where the exception is caught (rather than the site where it's thrown). It also allows for argument highlighting. * guix/diagnostics.scm (&formatted-message): New condition type. (check-format-string): New procedure. (formatted-message): New macro. * guix/ui.scm (report-load-error): Add clause for 'formatted-message?'. (warn-about-load-error): Likewise. (call-with-error-handling): Likewise. (read/eval): Likewise.
* diagnostics: Add a procedural variant of diagnostic procedures.Ludovic Courtès2020-07-25
| | | | | | | | | | Callers can pass 'report-error', 'warning', etc. to 'apply'. * guix/diagnostics.scm (trivial-format-string?): New procedure, moved from... (highlight-argument): ... here. (define-diagnostic): Add 'identifier?' clause. (emit-diagnostic): New procedure.
* utils: Move '&fix-hint' to (guix diagnostics).Ludovic Courtès2020-07-25
| | | | | | | | | | | * guix/utils.scm (&fix-hint): Move to... * guix/diagnostics.scm (&fix-hint): ... here. * gnu.scm: Adjust imports accordingly. * gnu/system/mapped-devices.scm: Likewise. * guix/channels.scm: Likewise. * guix/profiles.scm: Likewise. * guix/scripts/system/reconfigure.scm: Likewise. * guix/ssh.scm: Likewise.
* utils: Move <location> and '&error-location' to (guix diagnostics).Ludovic Courtès2020-07-25
| | | | | | | | | | | | | * guix/utils.scm (<location>, source-properties->location) (location->source-properties, &error-location): Move to... * guix/diagnostics.scm: ... here. * gnu.scm: Adjust imports accordingly. * gnu/machine.scm: Likewise. * gnu/system.scm: Likewise. * gnu/tests.scm: Likewise. * guix/inferior.scm: Likewise. * tests/channels.scm: Likewise. * tests/packages.scm: Likewise.
* diagnostics: Avoid highlighting complete messages.Ludovic Courtès2019-08-28
| | | | | * guix/diagnostics.scm (%highlight-argument): Don't highlight ARG if it contains white space.
* Add (guix diagnostics).Ludovic Courtès2019-06-03
* guix/ui.scm (warning, info, report-error, leave) (location->string, guix-warning-port, program-name) (highlight-argument, %highlight-argument, define-diagnostic) (%warning-color, %info-color, %error-color) (print-diagnostic-prefix): Move to... * guix/diagnostics.scm: ... here. New file. * Makefile.am (MODULES): Add it.