I have created a new dune project with the following structure:
- bin
- lib
- private
* private.ml
* foo.ml
* my_lib.ml
* dune
My dune file looks like this:
(include_subdirs qualified)
(library
(name my_lib)
(preprocess (pps ppx_inline_test ppx_expect))
(inline_tests))
my foo.ml contains some inline tests:
let hello_generator name = "Hello " ^ name
let%expect_test "blah" = print_string @@ helo_generator "blah"; [%expect {|Hello blah|}]
and private.ml contains:
let hello = Foo.hello_generator
when I run dune runtest, I get the following error:
File "lib/dune", line 6, characters 1-15:
6 | (inline_tests))
^^^^^^^^^^^^^^
Fatal error: exception Sys_error("$HOME/repos/my_project/_build/.sandbox/421aa677b2728e5983918ad9cb6d5a36/default/lib/foo.ml: No such file or directory")
Raised by primitive operation at Stdlib.open_in_gen in file "stdlib.ml", line 405, characters 28-54
Called from Stdlib.open_in_bin in file "stdlib.ml" (inlined), line 413, characters 2-47
Called from Ppx_expect_runtime__Write_corrected_file.f in file "runtime/write_corrected_file.ml", line 35, characters 21-48
Called from Base__List.map in file "src/list.ml", line 433, characters 15-18
...
I think this is probably related to the fact that Foo is not exposed, but I have no idea how to approach this.