11Test that when a stanza's internal module name shadows a library module name ,
22the internal module takes precedence. This validates that ocamldep-based
3- dependency filtering (which treats names found in stanza_modules as internal)
4- correctly reflects the compiler's resolution order.
3+ dependency filtering (which treats modules defined within the same stanza as
4+ internal) correctly reflects the compiler's resolution order.
55
66See: https: // github. com/ ocaml/ dune/ issues/ 4572
77
@@ -51,7 +51,7 @@ The build succeeds using the internal Helper:
5151The dependencies of main. ml's native compilation show dune__exe__Helper
5252(the internal module), not unwrapped_lib's helper:
5353
54- $ dune rules -- deps _build/ default /. main. eobjs/ native/ dune__exe__Main. cmx 2 > &1 | grep In_build_dir
54+ $ dune rules -- deps _build/ default /. main. eobjs/ native/ dune__exe__Main. cmx | grep In_build_dir
5555 (File (In_build_dir _build/ default /. main. eobjs/ byte/ dune__exe. cmi))
5656 (File (In_build_dir _build/ default /. main. eobjs/ byte/ dune__exe__Helper. cmi))
5757 (File (In_build_dir _build/ default /. main. eobjs/ byte/ dune__exe__Main. cmi))
@@ -64,7 +64,7 @@ The library's Helper.lib_value is not accessible:
6464 > let () = print_int Helper. lib_value
6565 > EOF
6666
67- $ dune build ./ main. exe 2 > &1
67+ $ dune build ./ main. exe
6868 File " main.ml" , line 1 , characters 19 -35:
6969 1 | let () = print_int Helper. lib_value
7070 ^^^^^^^^^^^^^^^^
0 commit comments