Module Omod_support.Pkg
Packages.
Packages represents sets of compilation objects indexed from a root Conf.libdir
.
Packages
type t
= Cobj.pkg_id
The type for packages.
val of_dir : ?err:Log.t -> Omod.fpath -> t list
of_dir ~err dir
are the packages found indir
. This is simply all the directory names insidedir
and anocaml
package which points toocamlc -where
.err
is used to report file system errors (defaults toLog.err
).
val find_cobjs : ?err:Log.t -> ?acc:Cobj.t list -> t -> Cobj.t list
find_cobjs ~err ~note ~acc pkg
are the compilation objects contained in pkgpkg
added toacc
(defaults to[]
).err
is used to report errors (defaults toLog.nil
).
val pp : Stdlib.Format.formatter -> t -> unit
pp
formats package identifiers.
val pp_name : Stdlib.Format.formatter -> t -> unit
pp_name
formats the name of package identifiers.
module Set : Stdlib.Set.S with type elt = t
Package identifier sets.
module Map : Stdlib.Map.S with type key = t
Package identifier maps.
Package signatures
type signature
= Digest.t
The type for package signatures.
Package information
val info : signature:signature -> cobjs:Cobj.t list -> info
info ~signature ~cobjs
is information for a package.
val pp_info : Stdlib.Format.formatter -> info -> unit
pp_info
formats package information.
Package databases
val db : ?err:Log.t -> ?note:Log.t -> ?progress:bool -> ?init:db -> t list -> db
db ~err ~note ~progress ~init pkgs
is databaseinit
(dfeaults toMap.empty
) with packagespkgs
added. Their information is computed by the function usingerr
to report errors (defaults toLog.err
),note
to report indexing operations (defaults toLog.nil
) andprogress
to indicate if progress should be reported onnote
(defaults tofalse
).
val db_to_name_db : db -> (t * info) Omod.Private.String.Map.t
db_to_name_db db
maps package names (rather than identifiers) to their information.
val db_to_cobj_index : db -> Cobj.Index.t
db_to_cobj_index db
is a compilatino object with the contents of the packages ofdb
.
val pp_diff : diff Omod.Private.Fmt.t
pp_diff
formats package database differences.
val diff : db -> (t * signature) list -> diff list
diff db sgs
is the list of difference betweendb
and package signaturessgs
.
val update : ?err:Log.t -> ?note:Log.t -> ?progress:bool -> db -> diff list -> db
udpate ~err ~note ~progress db diffs
isdb
updated according todiffs
.err
is used to report errors (defaults toLog.err
),note
to report indexing operations (defaults toLog.nil
) andprogress
to indicate if progress should be reported onnote
(defaults tofalse
).