Skip to content

Commit

Permalink
refactor: use Path.External.t for dump_memo_graph_file (#8117)
Browse files Browse the repository at this point in the history
Signed-off-by: Ali Caglayan <alizter@gmail.com>
  • Loading branch information
Alizter authored Jul 5, 2023
1 parent 156bd68 commit bb06683
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bin/build_cmd.ml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ let run_build_system ~common ~request =
match Common.dump_memo_graph_file common with
| None -> Fiber.return ()
| Some file ->
let path = Path.of_filename_relative_to_initial_cwd file in
let path = Path.external_ file in
let+ graph =
Memo.dump_cached_graph
~time_nodes:(Common.dump_memo_graph_with_timing common)
Expand Down
6 changes: 4 additions & 2 deletions bin/common.ml
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ module Builder = struct
; default_target : Arg.Dep.t (* For build & runtest only *)
; watch : Dune_rpc_impl.Watch_mode_config.t
; print_metrics : bool
; dump_memo_graph_file : string option
; dump_memo_graph_file : Path.External.t option
; dump_memo_graph_format : Graph.File_format.t
; dump_memo_graph_with_timing : bool
; dump_gc_stats : Path.External.t option
Expand Down Expand Up @@ -899,7 +899,9 @@ module Builder = struct
; default_target
; watch
; print_metrics
; dump_memo_graph_file
; dump_memo_graph_file =
Option.map dump_memo_graph_file
~f:Path.External.of_filename_relative_to_initial_cwd
; dump_memo_graph_format
; dump_memo_graph_with_timing
; dump_gc_stats =
Expand Down
2 changes: 1 addition & 1 deletion bin/common.mli
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ val stats : t -> Dune_stats.t option

val print_metrics : t -> bool

val dump_memo_graph_file : t -> string option
val dump_memo_graph_file : t -> Path.External.t option

val dump_memo_graph_format : t -> Dune_graph.Graph.File_format.t

Expand Down

0 comments on commit bb06683

Please sign in to comment.