Hi,
Am I running dune
incorrectly somehow so that it finds nothing to do
even when I have an obvious type error in my code?
Here’s my dune
call and its output:
accessor/test [master●] » dune build -w --auto-promote @runtest
Entering directory '/home/damonwang/prj/accessor'
^C
********** NEW BUILD **********
Done: 0/0 (jobs: 0)%
Here’s the code I expect to cause a type error:
accessor/test [master●] » git diff accessor_tests.ml
diff --git a/test/accessor_tests.ml b/test/accessor_tests.ml
index c9c244a..2722e9f 100644
--- a/test/accessor_tests.ml
+++ b/test/accessor_tests.ml
@@ -41,3 +41,7 @@ let%expect_test "match_" =
print_s [%sexp (Accessor.match_ Foo.a b : (int, Nothing.t Foo.t) Either.t)];
[%expect {| (Second B) |}]
;;
+
+type 'a t = (string list * (string list * 'a) list) [@@deriving accessors]
+
+let () = 1
Surprisingly, dune rules
reports (other) build errors:
accessor/test [master●] » dune rules
Entering directory '/home/damonwang/prj/accessor'
File "test/accessor_tests.ml", line 34, characters 16-34:
34 | [@@deriving accessors, sexp_of]
^^^^^^^^^^^^^^^^^^
Error: Ppxlib.Deriving: 'accessors' is not a supported type deriving generator
Done: 316/319 (jobs: 1)%
This is not the behavior I expected given dune dump --help
:
Dump Dune internal rules for the given targets. If no targets are
given, dump all the internal rules.
I’m on dune 2.7.1 and this was at the tip of the accessor
repo:
accessor/test [master●] » LESS= git log -r .
commit ee4f078637ac81e962a955db643d4af895760a07
Author: Xavier Clerc <xclerc@janestreet.com>
Date: Mon Feb 17 13:14:55 2020 +0000
v0.14-preview.122.08+346
accessor/test [master●] » git remote get-url origin
https://github.com/janestreet/accessor.git