Module B0_ocaml.Libresolver

Library resolvers.


module Scope : sig ... end

Resolution scopes.

type t

The type for library resolvers.

val make : B0_memo.t -> Conf.t -> Scope.t list -> t

make m ocaml_conf scopes is a library resolver looking for libraries in the given scopes, in order. ocaml_conf is the toolchain configuration. m gets marked by ocamlib.

Store key

val default : B0_store.t -> B0_memo.t -> t B0_std.Fut.t

default store memo determines a default library resolver for key. It uses the Conf.key in store and uses a with the build found in the store via B0_build.self followed by an Scope.ocamlfind in memo and a cache in the directory of the build.

val key : t B0_store.key

key is the library resolver used by the build units defined by B0_ocaml. It defaults to default.


val lookups : t -> Lib.t option B0_std.Fut.t Libname.Map.t

lookups r are the lookups performed in r so far.

val memo : t -> B0_memo.t

memo r is the memoizer of r.

val ocaml_conf : t -> Conf.t

ocaml_conf r is the OCaml configuration of r.

val scopes : t -> Scope.t list

scopes r are the scopes of r.


val find : B0_memo.t -> t -> Libname.t -> Lib.t option B0_std.Fut.t

find m r libname finds library libname in r. m is used to report notifications.

get m r libname gets library libname in r. The memo of r fails if the library cannot be found. m is used to report notication or failure.

val get_list_and_exports : B0_memo.t -> t -> Libname.t list -> Lib.t list B0_std.Fut.t

get_list r libnames looks up libraries libnames in r and the libraries they B0_ocaml.exports. Libraries are returned in the given order and the memo of r fails if a library cannot be found.

val get_list_and_deps : B0_memo.t -> t -> Libname.t list -> Lib.t list B0_std.Fut.t

get_list_and_deps b libnames looks up the libraires libnames and their dependencies in r. The result is a sorted in (stable) dependency order and the memo of r fails if a library cannot be found.