Skip to content

Commit

Permalink
refactor(pkg): remove some dead code (#10815)
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
  • Loading branch information
rgrinberg authored Aug 12, 2024
1 parent ada50e4 commit 230e480
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
22 changes: 0 additions & 22 deletions src/dune_rules/pkg_toolchain.ml
Original file line number Diff line number Diff line change
Expand Up @@ -56,28 +56,6 @@ let is_compiler_and_toolchains_enabled name =
| `Disabled -> false
;;

let files ~bin_dir =
let open Memo.O in
Fs_memo.dir_contents bin_dir
>>| function
| Error _ -> Section.Map.empty
| Ok files ->
let bin_paths =
Fs_cache.Dir_contents.to_list files
|> List.filter_map ~f:(fun (filename, kind) ->
match kind with
| Unix.S_REG | S_LNK ->
let path = Path.Outside_build_dir.relative bin_dir filename in
(try
Unix.access (Path.Outside_build_dir.to_string path) [ Unix.X_OK ];
Some (Path.outside_build_dir path)
with
| Unix.Unix_error _ -> None)
| _ -> None)
in
Section.Map.singleton Section.Bin bin_paths
;;

let ocaml context env ~bin_dir =
let which prog =
let open Memo.O in
Expand Down
1 change: 0 additions & 1 deletion src/dune_rules/pkg_toolchain.mli
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ val base_dir : unit -> Path.Outside_build_dir.t
not work correctly. *)
val is_compiler_and_toolchains_enabled : Package.Name.t -> bool

val files : bin_dir:Path.Outside_build_dir.t -> Path.t list Section.Map.t Memo.t
val pkg_dir : Dune_pkg.Lock_dir.Pkg.t -> Path.Outside_build_dir.t

(** Directory that will contain all the installed artifacts of the
Expand Down

0 comments on commit 230e480

Please sign in to comment.