Skip to content

Commit fdedb23

Browse files
authored
fix(include_qualified): add missing alias dependency to module group (ocaml#12530)
* fix(include_qualified): add missing alias dependency to module group Signed-off-by: Antonio Nuno Monteiro <[email protected]> * add changelog entry Signed-off-by: Antonio Nuno Monteiro <[email protected]> --------- Signed-off-by: Antonio Nuno Monteiro <[email protected]>
1 parent 0d5d415 commit fdedb23

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

doc/changes/12530.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- `(include_subdirs qualified)`: Add missing alias dependency to module group.
2+
(#12530, @anmonteiro)

src/dune_rules/modules.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ module Group = struct
457457
Module_name.Map.values g.modules |> List.concat_map ~f:closure_node
458458
in
459459
lib_interface :: closure
460-
| _ -> [ lib_interface ]
460+
| _ -> [ g.alias; lib_interface ]
461461

462462
and closure_node = function
463463
| Module m -> [ m ]

test/blackbox-tests/test-cases/include-qualified/build-with-sandbox.t

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,13 @@ Transitive deps file includes the alias module
4242
> let hello = "hello from sub"
4343
> EOF
4444

45-
$ DUNE_SANDBOX=none dune build
4645
$ DUNE_SANDBOX=symlink dune build
47-
File "lib/bar.ml", line 1, characters 12-27:
48-
1 | let hello = Sub.Hello.hello ^ Sub.world
49-
^^^^^^^^^^^^^^^
50-
Error: The module Sub.Hello is an alias for module Foo__Sub__.Hello, which is missing
51-
[1]
46+
47+
$ cat _build/default/lib/.foo.objs/foo__Bar.impl.d
48+
lib/bar.ml: Sub
49+
$ cat _build/default/lib/.foo.objs/foo__Bar.impl.all-deps
50+
foo__Sub
51+
foo__Sub__
52+
foo__Sub__Hello
53+
54+

0 commit comments

Comments
 (0)