@@ -1494,10 +1494,10 @@ end = struct
14941494 in
14951495 resolve db dep_loc dep_pkg_digest package_universe)
14961496 and + files_dir =
1497- let * lock_dir =
1497+ let + lock_dir =
14981498 Package_universe. lock_dir_path package_universe >> | Option. value_exn
14991499 in
1500- let + files_dir =
1500+ let files_dir =
15011501 let module Pkg = Dune_pkg.Lock_dir. Pkg in
15021502 (* TODO(steve): simplify this once portable lockdirs become the
15031503 default. This logic currently handles both the cases where
@@ -1509,17 +1509,15 @@ end = struct
15091509 let path_with_version =
15101510 Pkg. source_files_dir info.name (Some info.version) ~lock_dir
15111511 in
1512- let * path_with_version_exists =
1513- Fs_memo. dir_exists (Path.Outside_build_dir. In_source_dir path_with_version)
1512+ let path_with_version_exists =
1513+ Path.Untracked. exists (Path. source path_with_version)
15141514 in
15151515 match path_with_version_exists with
1516- | true ->
1517- Memo. return @@ Some (Pkg. files_dir info.name (Some info.version) ~lock_dir )
1516+ | true -> Some (Pkg. files_dir info.name (Some info.version) ~lock_dir )
15181517 | false ->
15191518 let path_without_version = Pkg. source_files_dir info.name None ~lock_dir in
1520- let + path_without_version_exists =
1521- Fs_memo. dir_exists
1522- (Path.Outside_build_dir. In_source_dir path_without_version)
1519+ let path_without_version_exists =
1520+ Path.Untracked. exists (Path. source path_without_version)
15231521 in
15241522 (match path_without_version_exists with
15251523 | true -> Some (Pkg. files_dir info.name None ~lock_dir )
@@ -1533,18 +1531,23 @@ end = struct
15331531 " Package files directory is external source directory, this is unsupported"
15341532 [ " dir" , Path.External. to_dyn e ]
15351533 | In_source_tree s ->
1534+ (* TODO this probably never happens now *)
15361535 (match Path.Source. explode s with
1537- | [ " _build" ; " dev-tools.locks" ; dev_tool; files_dir ] ->
1536+ | [ " _build" ; " . dev-tools.locks" ; dev_tool; files_dir ] ->
15381537 Path.Build.L. relative
15391538 Private_context. t.build_dir
15401539 [ " default" ; " .dev-tool-locks" ; dev_tool; files_dir ]
15411540 | otherwise ->
15421541 Code_error. raise
15431542 " Unexpected files_dir path"
15441543 [ " components" , (Dyn. list Dyn. string ) otherwise ])
1545- | In_build_dir b ->
1546- (* it's already a build path, no need to do anything *)
1547- b)
1544+ | In_build_dir b -> (
1545+ match Path.Build. explode b with
1546+ | [" .dev-tools.locks" ; dev_tool; files_dir] ->
1547+ Path.Build.L. relative
1548+ Private_context. t.build_dir
1549+ [ " default" ; " .dev-tool-locks" ; dev_tool; files_dir ]
1550+ | _otherwise -> b))
15481551 in
15491552 let id = Pkg.Id. gen () in
15501553 let write_paths =
0 commit comments