From a738e1bc383470b989a08df04f2b5010702b7238 Mon Sep 17 00:00:00 2001 From: Jeremie Dimino Date: Tue, 10 Jul 2018 04:58:47 +0100 Subject: [PATCH] Expose a bug when shadowing a macro Signed-off-by: Jeremie Dimino --- test/blackbox-tests/test-cases/shadow-bindings/dune | 12 +++++++++++- test/blackbox-tests/test-cases/shadow-bindings/run.t | 10 ++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/test/blackbox-tests/test-cases/shadow-bindings/dune b/test/blackbox-tests/test-cases/shadow-bindings/dune index 68875f23..bbb68666 100644 --- a/test/blackbox-tests/test-cases/shadow-bindings/dune +++ b/test/blackbox-tests/test-cases/shadow-bindings/dune @@ -2,4 +2,14 @@ (alias (name runtest) (deps (:root foo)) - (action (echo %{root}))) \ No newline at end of file + (action (echo %{root}))) + +(alias + (name runtest) + (deps (:read x)) + (action (progn + (echo %{read}) + (echo %{read:y})))) + +(rule (with-stdout-to x (echo "a\n"))) +(rule (with-stdout-to y (echo "b\n"))) diff --git a/test/blackbox-tests/test-cases/shadow-bindings/run.t b/test/blackbox-tests/test-cases/shadow-bindings/run.t index 015e5376..8c9d2c57 100644 --- a/test/blackbox-tests/test-cases/shadow-bindings/run.t +++ b/test/blackbox-tests/test-cases/shadow-bindings/run.t @@ -1,4 +1,14 @@ Bindings introduced by user dependencies should shadow existing bindings $ dune runtest + Internal error, please report upstream including the contents of _build/log. + Description: + ("Local named variable not present in named deps" + (pform "\%{read:y}") + (deps_written_by_user ((:read (In_build_dir default/x))))) + Backtrace: + Raised at file "src/dep_path.ml" (inlined), line 45, characters 24-55 + Called from file "src/build_system.ml", line 89, characters 6-48 + Called from file "src/fiber/fiber.ml", line 243, characters 6-18 foo + [1]