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