@@ -66,7 +66,7 @@ let make_local_package_wrapping_dev_tool ~dev_tool ~dev_tool_version ~extra_depe
6666 }
6767;;
6868
69- let solve ~dev_tool ~local_packages =
69+ let solve ctx_name ~dev_tool ~local_packages =
7070 let open Memo.O in
7171 let * solver_env_from_current_system =
7272 Pkg_common. poll_solver_env_from_current_system ()
@@ -79,7 +79,7 @@ let solve ~dev_tool ~local_packages =
7979 Workspace. add_repo workspace Dune_pkg.Pkg_workspace.Repository. binary_packages
8080 | `Disabled -> workspace
8181 in
82- let lock_dir = Lock_dir. dev_tool_lock_dir_path dev_tool in
82+ let lock_dir = Lock_dir. dev_tool_lock_dir_path ctx_name dev_tool in
8383 Memo. of_reproducible_fiber
8484 @@ Lock. solve
8585 workspace
@@ -171,9 +171,9 @@ let extra_dependencies dev_tool =
171171 [ constraint_ ]
172172;;
173173
174- let lockdir_status dev_tool =
174+ let lockdir_status ctx_name dev_tool =
175175 let open Memo.O in
176- let dev_tool_lock_dir = Lock_dir. dev_tool_lock_dir_path dev_tool in
176+ let dev_tool_lock_dir = Lock_dir. dev_tool_lock_dir_path ctx_name dev_tool in
177177 match Lock_dir. read_disk dev_tool_lock_dir with
178178 | Error _ -> Memo. return `No_lockdir
179179 | Ok { packages; _ } ->
@@ -205,14 +205,14 @@ let lockdir_status dev_tool =
205205 ]))))
206206;;
207207
208- (* [lock_dev_tool_at_version dev_tool version] generates the lockdir for the
209- dev tool [dev_tool]. If [version] is [Some v] then version [v] of the tool
210- will be chosen by the solver. Otherwise the solver is free to choose the
211- appropriate version of the tool to install. *)
212- let lock_dev_tool_at_version dev_tool version =
208+ (* [lock_dev_tool_at_version ctx_name dev_tool version] generates the lockdir
209+ for the dev tool [dev_tool]. If [version] is [Some v] then version [v] of
210+ the tool will be chosen by the solver. Otherwise the solver is free to
211+ choose the appropriate version of the tool to install. *)
212+ let lock_dev_tool_at_version ctx_name dev_tool version =
213213 let open Memo.O in
214214 let * need_to_solve =
215- lockdir_status dev_tool
215+ lockdir_status ctx_name dev_tool
216216 >> | function
217217 | `Lockdir_ok -> false
218218 | `No_lockdir -> true
@@ -238,17 +238,17 @@ let lock_dev_tool_at_version dev_tool version =
238238 ~extra_dependencies
239239 in
240240 let local_packages = Package_name.Map. singleton local_pkg.name local_pkg in
241- solve ~dev_tool ~local_packages
241+ solve ctx_name ~dev_tool ~local_packages
242242 else Memo. return ()
243243;;
244244
245- let lock_ocamlformat () =
245+ let lock_ocamlformat ctx_name () =
246246 let version = Dune_pkg.Ocamlformat. version_of_current_project's_ocamlformat_config () in
247- lock_dev_tool_at_version Ocamlformat version
247+ lock_dev_tool_at_version ctx_name Ocamlformat version
248248;;
249249
250- let lock_dev_tool dev_tool =
250+ let lock_dev_tool ctx_name dev_tool =
251251 match (dev_tool : Dune_pkg.Dev_tool.t ) with
252- | Ocamlformat -> lock_ocamlformat ()
253- | other -> lock_dev_tool_at_version other None
252+ | Ocamlformat -> lock_ocamlformat ctx_name ()
253+ | other -> lock_dev_tool_at_version ctx_name other None
254254;;
0 commit comments