parent
34a8951292
commit
3b0c6403ee
|
@ -400,7 +400,7 @@ let external_lib_deps =
|
|||
in
|
||||
let missing =
|
||||
String_map.filter externals ~f:(fun name _ ->
|
||||
not (Findlib.available context.findlib name))
|
||||
not (Findlib.available context.findlib name ~required_by:[]))
|
||||
in
|
||||
if String_map.is_empty missing then
|
||||
acc
|
||||
|
|
|
@ -424,9 +424,9 @@ let find t ~required_by name =
|
|||
| exception (Package_not_found _) -> None
|
||||
| x -> Some x
|
||||
|
||||
let available t name =
|
||||
match find_exn t name with
|
||||
| _ -> true
|
||||
let available t ~required_by name =
|
||||
match find_exn t name ~required_by with
|
||||
| (_ : package) -> true
|
||||
| exception (Package_not_found _) -> false
|
||||
|
||||
let closure pkgs =
|
||||
|
|
|
@ -34,7 +34,7 @@ type package =
|
|||
val find : t -> required_by:string list -> string -> package option
|
||||
val find_exn : t -> required_by:string list -> string -> package
|
||||
|
||||
val available : t -> string -> bool
|
||||
val available : t -> required_by:string list -> string -> bool
|
||||
|
||||
val root_package_name : string -> string
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ let top_sort_internals t ~internal_libraries =
|
|||
let lib_is_installable t ~from name =
|
||||
match find_internal t ~from name with
|
||||
| Some (_, lib) -> String_map.mem lib.name t.instalable_internal_libs
|
||||
| None -> Findlib.available t.findlib name
|
||||
| None -> Findlib.available t.findlib name ~required_by:[Utils.jbuild_name_in ~dir:from]
|
||||
|
||||
let choice_is_possible t ~from { Lib_dep. lits; _ } =
|
||||
List.for_all lits ~f:(function
|
||||
|
|
Loading…
Reference in New Issue