@@ -197,6 +197,13 @@ let solve_multiple_platforms
197197 |> Platforms_by_message. all_solver_errors_raising_if_any_manifest_errors )
198198;;
199199
200+ let user_lock_dir_path path =
201+ match (path : Path.t ) with
202+ | In_source_tree _ -> path
203+ | In_build_dir _ -> path
204+ | External e -> Dune_pkg.Pkg_workspace. dev_tool_path_to_source_dir e |> Path. source
205+ ;;
206+
200207let summary_message
201208 ~portable_lock_dir
202209 ~lock_dir_path
@@ -259,7 +266,9 @@ let summary_message
259266 in
260267 (Pp. tag
261268 User_message.Style. Success
262- (Pp. textf " Solution for %s" (Path. to_string_maybe_quoted lock_dir_path))
269+ (Pp. textf
270+ " Solution for %s"
271+ (Path. to_string_maybe_quoted (user_lock_dir_path lock_dir_path)))
263272 :: Pp. nop
264273 :: Pp. text " Dependencies common to all supported platforms:"
265274 :: pp_package_set common_packages
@@ -268,7 +277,9 @@ let summary_message
268277 else
269278 (Pp. tag
270279 User_message.Style. Success
271- (Pp. textf " Solution for %s:" (Path. to_string_maybe_quoted lock_dir_path))
280+ (Pp. textf
281+ " Solution for %s:"
282+ (Path. to_string_maybe_quoted (user_lock_dir_path lock_dir_path)))
272283 :: (match Lock_dir.Packages. to_pkg_list lock_dir.packages with
273284 | [] -> Pp. tag User_message.Style. Warning @@ Pp. text " (no dependencies to lock)"
274285 | packages -> pp_packages packages)
@@ -491,7 +502,9 @@ let solve
491502 ([ Pp. text " Unable to solve dependencies for the following lock directories:" ]
492503 @ List. concat_map errors ~f: (fun (path , errors ) ->
493504 let messages = List. map errors ~f: fst in
494- [ Pp. textf " Lock directory %s:" (Path. to_string_maybe_quoted path)
505+ [ Pp. textf
506+ " Lock directory %s:"
507+ (Path. to_string_maybe_quoted (user_lock_dir_path path))
495508 ; Pp. vbox (Pp. concat ~sep: Pp. cut messages)
496509 ]))
497510 | Ok write_disks_with_summaries ->
0 commit comments