Merge pull request #797 from rgrinberg/build-job-set
Change Build_job to be set
This commit is contained in:
commit
f59fe20344
|
@ -1044,12 +1044,13 @@ let install_uninstall ~what =
|
||||||
in
|
in
|
||||||
Fiber.parallel_iter install_files_by_context
|
Fiber.parallel_iter install_files_by_context
|
||||||
~f:(fun (context, install_files) ->
|
~f:(fun (context, install_files) ->
|
||||||
|
let install_files_set = Path.Set.of_list install_files in
|
||||||
get_prefix context ~from_command_line:prefix_from_command_line
|
get_prefix context ~from_command_line:prefix_from_command_line
|
||||||
>>= fun prefix ->
|
>>= fun prefix ->
|
||||||
get_libdir context ~libdir_from_command_line
|
get_libdir context ~libdir_from_command_line
|
||||||
>>= fun libdir ->
|
>>= fun libdir ->
|
||||||
Fiber.parallel_iter install_files ~f:(fun path ->
|
Fiber.parallel_iter install_files ~f:(fun path ->
|
||||||
let purpose = Process.Build_job install_files in
|
let purpose = Process.Build_job install_files_set in
|
||||||
Process.run ~purpose ~env:setup.env Strict opam_installer
|
Process.run ~purpose ~env:setup.env Strict opam_installer
|
||||||
([ sprintf "-%c" what.[0]
|
([ sprintf "-%c" what.[0]
|
||||||
; Path.to_string path
|
; Path.to_string path
|
||||||
|
|
|
@ -929,7 +929,6 @@ let exec ~targets ~context t =
|
||||||
| None -> Env.initial
|
| None -> Env.initial
|
||||||
| Some c -> c.env
|
| Some c -> c.env
|
||||||
in
|
in
|
||||||
let targets = Path.Set.to_list targets in
|
|
||||||
let purpose = Process.Build_job targets in
|
let purpose = Process.Build_job targets in
|
||||||
let ectx = { purpose; context } in
|
let ectx = { purpose; context } in
|
||||||
exec t ~ectx ~dir:Path.root ~env ~stdout_to:None ~stderr_to:None
|
exec t ~ectx ~dir:Path.root ~env ~stdout_to:None ~stderr_to:None
|
||||||
|
|
|
@ -46,7 +46,7 @@ and opened_file_desc =
|
||||||
|
|
||||||
type purpose =
|
type purpose =
|
||||||
| Internal_job
|
| Internal_job
|
||||||
| Build_job of Path.t list
|
| Build_job of Path.Set.t
|
||||||
|
|
||||||
module Temp = struct
|
module Temp = struct
|
||||||
let tmp_files = ref Path.Set.empty
|
let tmp_files = ref Path.Set.empty
|
||||||
|
@ -157,6 +157,7 @@ module Fancy = struct
|
||||||
split_paths (("alias " ^ Path.to_string name) :: targets_acc)
|
split_paths (("alias " ^ Path.to_string name) :: targets_acc)
|
||||||
(add_ctx ctx ctxs_acc) rest
|
(add_ctx ctx ctxs_acc) rest
|
||||||
in
|
in
|
||||||
|
let targets = Path.Set.to_list targets in
|
||||||
let target_names, contexts = split_paths [] [] targets in
|
let target_names, contexts = split_paths [] [] targets in
|
||||||
let target_names_grouped_by_prefix =
|
let target_names_grouped_by_prefix =
|
||||||
List.map target_names ~f:Filename.split_extension_after_dot
|
List.map target_names ~f:Filename.split_extension_after_dot
|
||||||
|
|
|
@ -34,7 +34,7 @@ and opened_file_desc =
|
||||||
(** Why a Fiber.t was run *)
|
(** Why a Fiber.t was run *)
|
||||||
type purpose =
|
type purpose =
|
||||||
| Internal_job
|
| Internal_job
|
||||||
| Build_job of Path.t list
|
| Build_job of Path.Set.t
|
||||||
|
|
||||||
(** [run ?dir ?stdout_to prog args] spawns a sub-process and wait for its termination *)
|
(** [run ?dir ?stdout_to prog args] spawns a sub-process and wait for its termination *)
|
||||||
val run
|
val run
|
||||||
|
|
Loading…
Reference in New Issue