Skip to content

Commit

Permalink
Lib.entry_module_names: remove ~local_lib
Browse files Browse the repository at this point in the history
it's no longer necessary

Signed-off-by: Rudi Grinberg <[email protected]>
  • Loading branch information
rgrinberg committed Jan 13, 2021
1 parent e268e3a commit ad3b098
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
3 changes: 1 addition & 2 deletions src/dune_rules/compilation_context.ml
Original file line number Diff line number Diff line change
Expand Up @@ -227,5 +227,4 @@ let without_bin_annot t = { t with bin_annot = false }
let root_module_entries t : Module_name.t list Or_exn.t =
let open Result.O in
let* requires = t.requires_compile in
let local_lib = Fdecl.get Super_context.modules_of_lib t.super_context in
Result.List.concat_map requires ~f:(Lib.entry_module_names ~local_lib)
Result.List.concat_map requires ~f:Lib.entry_module_names
8 changes: 4 additions & 4 deletions src/dune_rules/lib.ml
Original file line number Diff line number Diff line change
Expand Up @@ -368,13 +368,13 @@ let main_module_name t =
| This x -> x
| From _ -> assert false )

let entry_module_names t ~local_lib =
let entry_module_names t =
match Lib_info.entry_modules t.info with
| External d -> d
| Local ->
let info = Lib_info.as_local_exn t.info in
let modules = local_lib ~dir:(Lib_info.src_dir info) ~name:t.name in
Ok (Modules.entry_modules modules |> List.map ~f:Module.name)
Ok
( Option.value_exn t.modules |> Lazy.force |> Modules.entry_modules
|> List.map ~f:Module.name )

let wrapped t =
let wrapped = Lib_info.wrapped t.info in
Expand Down
5 changes: 1 addition & 4 deletions src/dune_rules/lib.mli
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ val info : t -> Path.t Lib_info.t

val main_module_name : t -> Module_name.t option Or_exn.t

val entry_module_names :
t
-> local_lib:(dir:Path.Build.t -> name:Lib_name.t -> Modules.t)
-> Module_name.t list Or_exn.t
val entry_module_names : t -> Module_name.t list Or_exn.t

val wrapped : t -> Wrapped.t option Or_exn.t

Expand Down

0 comments on commit ad3b098

Please sign in to comment.