Skip to content

Commit

Permalink
refactor: resolve installed binaries to local paths
Browse files Browse the repository at this point in the history
This avoids with possible cycles involving loading the install rules

Signed-off-by: Rudi Grinberg <[email protected]>

<!-- ps-id: cb6fc8f6-5f50-439b-b542-6b933c656af0 -->
  • Loading branch information
rgrinberg committed Dec 13, 2023
1 parent cf584bf commit f6dcec0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/dune_rules/artifacts_db.ml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ let available_exes ~dir (exes : Dune_file.Executables.t) =

let get_installed_binaries ~(context : Context.t) stanzas =
let open Memo.O in
let install_dir = Install.Context.bin_dir ~context:(Context.name context) in
let expand_str ~dir sw = Expander.With_reduced_var_set.expand_str ~context ~dir sw in
let expand_str_partial ~dir sw =
Expander.With_reduced_var_set.expand_str_partial ~context ~dir sw
Expand All @@ -60,7 +59,7 @@ let get_installed_binaries ~(context : Context.t) stanzas =
in
let p = Path.Local.of_string (Install.Entry.Dst.to_string p) in
if Path.Local.is_root (Path.Local.parent_exn p)
then Some (Path.Build.append_local install_dir p)
then Some (Path.Build.append_local dir p)
else None)
>>| List.filter_opt
>>| Path.Build.Set.of_list
Expand Down

0 comments on commit f6dcec0

Please sign in to comment.