package obi

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Index of all the opam2 builds. The Index module contains types for the opam2 bulk build results.

type deps = (string * string * [ `Fail | `Ok | `Skipped ]) list

deps is a list of package dependencies, where each entry is a tuple of name, version, status

val sexp_of_deps : deps -> Ppx_sexp_conv_lib.Sexp.t
val deps_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> deps
type result = [
  1. | `Ok
  2. | `Fail of int * deps
  3. | `Depfail of deps
  4. | `Uninstallable of string list
  5. | `No_sources of string list
  6. | `Solver_failure
]

result represents the exit result of an opam invocation. The raw exit codes are parsed to look for special opam exit codes, which indicate errors such as the internal solver failing to find a result.

val sexp_of_result : result -> Ppx_sexp_conv_lib.Sexp.t
val result_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> result
val __result_of_sexp__ : Ppx_sexp_conv_lib.Sexp.t -> result
val pp_result : Format.formatter -> result -> unit

pp_result ppf result will print a human-readable result to formatter ppf

type params = {
  1. arch : Dockerfile_distro.arch;
    (*

    CPU architecture

    *)
  2. distro : Dockerfile_distro.t;
    (*

    Operating system distribution

    *)
  3. ov : Ocaml_version.t;
    (*

    OCaml compiler version

    *)
}

params represents some of the build parameters that opam packages are tested against. These include the CPU architecture, OS distribution and OCaml compiler version.

val sexp_of_params : params -> Ppx_sexp_conv_lib.Sexp.t
val params_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> params
type metadata = {
  1. rev : string;
    (*

    opam-repository git revision hash that this run was built against

    *)
  2. params : params;
    (*

    build params for this run

    *)
  3. build_result : result;
    (*

    result of the execution of this set of parameters

    *)
  4. duration : float;
    (*

    wall clock time of the duration of the build in Unix seconds

    *)
  5. log : string list;
    (*

    list of log lines. This is blank unless there is an error

    *)
}

metadata contains the results and parameters for a single build run of a package and version.

val sexp_of_metadata : metadata -> Ppx_sexp_conv_lib.Sexp.t
val metadata_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> metadata
type pkg = {
  1. name : string;
    (*

    opam package name

    *)
  2. mutable maintainers : string list;
    (*

    list of maintainers associated with this package. As a heuristic, all of the maintainers listed for all versions are bundled together here for simplicity.

    *)
  3. mutable tags : string list;
    (*

    list of tags associated with this package. As a heuristic, all of the tags listed of all versions are bundled together here for simplicity.

    *)
  4. mutable versions : (string * metadata list) list;
    (*

    list of a tuple of opam package version and the list of build results. There is a list of results since there are usually multiple different runs for every version, to test it against different compiler and CPU/OS combinations.

    *)
}

pkg collects all the metadata for all versions of a given opam package.

val sexp_of_pkg : pkg -> Ppx_sexp_conv_lib.Sexp.t
val pkg_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> pkg
type t = {
  1. version : int;
  2. packages : pkg list;
}

t contains a version number of the metadata system, which is set to current_version for the latest builds. Older clients can parse the sexpression to determine if they need to upgrade for a newer format. The CHANGES.md file in the Obi source code repository tracks metadata version number bumps.

include Ppx_sexp_conv_lib.Sexpable.S with type t := t
val t_of_sexp : Sexplib0.Sexp.t -> t
val sexp_of_t : t -> Sexplib0.Sexp.t
val current_version : int

current_version is a monotonically increasing number for the version of Obi in use.

type maintainers = (string * string list) list

maintainers is an association list of the package name (including version string) to the list of maintainers registered for that package. As a heuristic, all of the maintainers listed for all versions are bundled here for simplicity.

val sexp_of_maintainers : maintainers -> Ppx_sexp_conv_lib.Sexp.t
val maintainers_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> maintainers
type tags = (string * string list) list

tags is an association list of the package name (including version string) to the list of tags registered for that package. As a heuristic, all of the tags listed for all versions are bundled here for simplicity.

val sexp_of_tags : tags -> Ppx_sexp_conv_lib.Sexp.t
val tags_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> tags