Skip to content

Commit

Permalink
_
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
  • Loading branch information
rgrinberg committed May 14, 2024
1 parent 3ca862a commit 5ed04b1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/dune_rules/exe.ml
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,8 @@ let build_and_link_many
let open Memo.O in
let* () = Module_compilation.build_all cctx in
let* () =
Memo.when_ (Compilation_context.bin_annot cctx) (Ocaml_index.cctx_rules cctx)
Memo.when_ (Compilation_context.bin_annot cctx) (fun () ->
Ocaml_index.cctx_rules cctx)
in
link_many
?link_args
Expand Down
4 changes: 3 additions & 1 deletion src/dune_rules/lib_rules.ml
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,9 @@ let library_rules
let+ () = Check_rules.add_obj_dir sctx ~obj_dir mode in
info
in
let+ () = Memo.when_ (Compilation_context.bin_annot cctx) (Ocaml_index.cctx_rules cctx)
let+ () =
Memo.when_ (Compilation_context.bin_annot cctx) (fun () ->
Ocaml_index.cctx_rules cctx)
and+ () =
Memo.when_
(not (Library.is_virtual lib))
Expand Down
2 changes: 1 addition & 1 deletion src/dune_rules/merlin/ocaml_index.ml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let index_path_in_obj_dir obj_dir =

let project_index ~build_dir = Path.Build.relative build_dir "project.ocaml-index"

let cctx_rules cctx () =
let cctx_rules cctx =
let open Memo.O in
(* Indexing is performed by the external binary [ocaml-index] which performs
full shape reduction to compute the actual definition of all the elements in
Expand Down
2 changes: 1 addition & 1 deletion src/dune_rules/merlin/ocaml_index.mli
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ val project_index : build_dir:Path.Build.t -> Path.Build.t
(** [cctx_rules cctx] sets the rules needed to generate the indexes for every
module in the compilation context [cctx] and aggregate them in a
[cctx.uideps] index covering the whole compilation context. *)
val cctx_rules : Compilation_context.t -> unit -> unit Memo.t
val cctx_rules : Compilation_context.t -> unit Memo.t

(** [context_indexes] lists all the available cctx.ocaml-index files in the
given context *)
Expand Down

0 comments on commit 5ed04b1

Please sign in to comment.