Skip to content

Commit 011e69d

Browse files
authored
Action builder alias module (#12772)
Otherwise, the failure to load an instance would prevent all the rules in the object directory from rule loading. Signed-off-by: Rudi Grinberg <[email protected]>
1 parent fe06751 commit 011e69d

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/dune_rules/module_compilation.ml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -513,12 +513,11 @@ end
513513

514514
let build_alias_module cctx group =
515515
let alias_file =
516+
let open Action_builder.O in
516517
let+ instances =
517-
Resolve.Memo.read_memo
518-
@@
519518
match Compilation_context.instances cctx with
520-
| None -> Resolve.Memo.return []
521-
| Some instances -> instances
519+
| None -> Action_builder.return []
520+
| Some instances -> Resolve.Memo.read instances
522521
in
523522
let project = Compilation_context.scope cctx |> Scope.project in
524523
let modules = Compilation_context.modules cctx in
@@ -533,8 +532,7 @@ let build_alias_module cctx group =
533532
~loc:Loc.none
534533
sctx
535534
~dir
536-
(Action_builder.of_memo alias_file
537-
|> Action_builder.write_file_dyn (Path.as_in_build_dir_exn file))
535+
(Action_builder.write_file_dyn (Path.as_in_build_dir_exn file) alias_file)
538536
in
539537
let cctx = Compilation_context.for_alias_module cctx alias_module in
540538
build_module cctx alias_module

0 commit comments

Comments
 (0)