Skip to content

Commit

Permalink
Driver: Use Log.app instead of eprintf to display progress
Browse files Browse the repository at this point in the history
  • Loading branch information
panglesd committed Dec 13, 2024
1 parent 4a799f1 commit 082f3c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/driver/odoc_driver.ml
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ let run mode
else []
in
Logs.debug (fun m -> m "XXXX Remaps length: %d" (List.length remaps));
Format.eprintf "Starting the compilation process... \n%!";
Logs.app (fun m -> m "Starting the compilation process... \n%!");
let () =
Eio.Fiber.both
(fun () ->
Expand Down Expand Up @@ -255,7 +255,7 @@ let run mode
(fun () -> render_stats env ~generate_json nb_workers)
in

Format.eprintf "Collected logs... \n%!";
Logs.app (fun m -> m "Collected logs... \n%!");
let grep_log ty s =
let open Astring in
let do_ affix =
Expand Down Expand Up @@ -293,7 +293,8 @@ let run mode
| _ -> ())
!Cmd_outputs.outputs;

Format.eprintf "Benchmarking... \n%!";
Logs.app (fun m -> m "Benchmarking... \n%!");

if stats then Stats.bench_results html_dir

open Cmdliner
Expand Down
4 changes: 2 additions & 2 deletions src/driver/packages.ml
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ let of_libs ~packages_dir libs =
fix_missing_deps packages

let of_packages ~packages_dir packages =
Format.eprintf "Computing deps... \n%!";
Logs.app (fun m -> m "Computing deps... \n%!");
let deps =
if packages = [] then Opam.all_opam_packages () else Opam.deps packages
in
Expand All @@ -442,7 +442,7 @@ let of_packages ~packages_dir packages =

let all = orig @ ps in

Format.eprintf "Analyzing packages needed to be built... \n%!";
Logs.app (fun m -> m "Analyzing packages needed to be built... \n%!");
let packages =
List.fold_left
(fun acc (pkg, files) ->
Expand Down

0 comments on commit 082f3c1

Please sign in to comment.