File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -526,10 +526,11 @@ let in_source_tree path =
526526 Path.Source.L. relative Path.Source. root components
527527 | source_components ->
528528 (match Path.Build. explode b with
529- | ".dev-tools.locks" :: dev_tool :: components ->
530- Path.Source.L. relative
531- Path.Source. root
532- ([ " _build" ; " .dev-tools.locks" ; dev_tool ] @ components)
529+ | (".dev-tools.locks" as prefix ) :: dev_tool :: components ->
530+ let build_as_source =
531+ Path. build_dir |> Path. to_string |> Path.Source. of_string
532+ in
533+ Path.Source.L. relative build_as_source (prefix :: dev_tool :: components)
533534 | build_components ->
534535 Code_error. raise
535536 " Unexpected location of lock directory in build directory"
Original file line number Diff line number Diff line change @@ -79,10 +79,9 @@ let dev_tool_path_to_source_dir path =
7979 [ " external" , Path.External. to_dyn path ]
8080 | In_build_dir b ->
8181 (match Path.Build. explode b with
82- | ".dev-tools.locks" :: dev_tool_name :: components ->
83- Path.Source.L. relative
84- Path.Source. root
85- ([ " _build" ; " .dev-tools.locks" ; dev_tool_name ] @ components)
82+ | (".dev-tools.locks" as prefix ) :: dev_tool_name :: components ->
83+ let build_as_source = Path. build_dir |> Path. to_string |> Path.Source. of_string in
84+ Path.Source.L. relative build_as_source (prefix :: dev_tool_name :: components)
8685 | components ->
8786 Code_error. raise
8887 " Unexpected external path"
You can’t perform that action at this time.
0 commit comments