This commit is contained in:
swrup 2025-11-11 02:07:51 +01:00
parent aa2ff7b2f0
commit 2f3113f55d
11742 changed files with 1223940 additions and 0 deletions

View file

@ -0,0 +1,39 @@
include_subdirs should not recurse past project root
$ cat >dune-project <<EOF
> (lang dune 3.1)
> EOF
$ cat >dune <<EOF
> (include_subdirs unqualified)
> (executable
> (name foo))
> EOF
$ cat >foo.ml <<EOF
> print_endline Bar.v;;
> EOF
$ mkdir subproj
$ cat >subproj/bar.ml <<EOF
> let v = "unusable"
> EOF
Works if [subproj] is just a separate directory and not a separate project.
$ dune exec ./foo.exe
unusable
$ cat >subproj/dune-project <<EOF
> (lang dune 3.1)
> EOF
Doesn't work with when we make [subproj] a separate project with a dune-project
file, since include_subdirs is stopped.
$ dune exec ./foo.exe
File "foo.ml", line 1, characters 14-19:
1 | print_endline Bar.v;;
^^^^^
Error: Unbound module Bar
[1]