dune icon indicating copy to clipboard operation
dune copied to clipboard

test stanza forget its deps aliases when a .expected file is present

Open Ninjapouet opened this issue 5 years ago • 0 comments

Expected Behavior

Bound dependencies in test stanza should not depend on .expected file presence.

Actual Behavior

When .expected file is present, bound dependency variables are forgotten.

Reproduction

Here is a minimal case reproduction: $ tree . ├── dune ├── dune-project ├── empty └── foo.ml

$ cat dune (test (name foo) (deps (:bar empty)) (action (run %{test} %{bar})))

As you can see, we bind a dependency to bar. foo.ml is empty.

$ dune test Done: 9/11 (jobs: 1)

Now, I add a expectation to my test: $ touch foo.expected

And now, I expect the following result: $ dune test Done: 9/11 (jobs: 1)

Actual Behavior

Last command gives: dune test File "dune", line 4, characters 24-28: 4 | (action (run %{test} %{bar}))) ^^^^ Error: Unknown variable "bar" Done: 0/0 (jobs: 0)

Specifications

  • Version of dune: 2.7.0
  • Version of ocaml: 4.11.1
  • Operating system (distribution and version): Ubuntu 20.04

Ninjapouet avatar Sep 18 '20 11:09 Ninjapouet