diff options
author | Ludovic Courtès <ludo@gnu.org> | 2021-04-29 00:38:03 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2021-04-29 01:22:04 +0200 |
commit | 524c9800afb433cc474132185d8e37f72004adb3 (patch) | |
tree | 019787ee7991d95e92e58f0f3e2f30224c821ab9 /guix/diagnostics.scm | |
parent | 0ce1b281511bd1a9505f416ec7ff1be3c3d7a243 (diff) |
diagnostics, ui: Adjust to 'read-error' and 'syntax-error' in Guile 3.0.6.
* 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.
Diffstat (limited to 'guix/diagnostics.scm')
-rw-r--r-- | guix/diagnostics.scm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/guix/diagnostics.scm b/guix/diagnostics.scm index 7b9ffc61b5..6a792febd4 100644 --- a/guix/diagnostics.scm +++ b/guix/diagnostics.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -233,6 +233,10 @@ etc." (make-location file (+ line 1) col))) (#f #f) + (#(file line column) + ;; Guile >= 3.0.6 uses vectors instead of alists internally, which can be + ;; seen in the arguments to 'syntax-error' exceptions. + (location file (+ 1 line) column)) (_ (let ((file (assq-ref loc 'filename)) (line (assq-ref loc 'line)) |