From 723bdb8ef0175716a2bfa93e96c3fd757d7b2679 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 20 Jul 2019 00:33:50 +0200 Subject: ui: 'warn-about-load-error' provides hints for unbound variables. * guix/ui.scm (warn-about-load-error): Add 'unbound-variable' clause. * tests/guix-build.sh: Add test. --- tests/guix-build.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/guix-build.sh b/tests/guix-build.sh index d16b92d189..37666ffd01 100644 --- a/tests/guix-build.sh +++ b/tests/guix-build.sh @@ -146,8 +146,8 @@ test `guix build -d --sources=transitive foo \ | wc -l` -eq 3 -# Unbound variables. -cat > "$module_dir/foo.scm"< "$module_dir/foo.scm" < "$module_dir/err" || true grep "unbound" "$module_dir/err" # actual error grep "forget.*(gnu packages base)" "$module_dir/err" # hint + +# Unbound variable at the top level. +cat > "$module_dir/foo.scm" < "$module_dir/err" +grep "unbound" "$module_dir/err" # actual error +grep "forget.*(guix build-system gnu)" "$module_dir/err" # hint + rm -f "$module_dir"/* # Wrong 'define-module' clause reported by 'warn-about-load-error'. -- cgit v1.2.3