Module Task

module Task: sig .. end
User-defined tasks.

A task is a high-level description of user intents. It allows to express things like:

"I want to compiler the package X to all supported host configurations and all OCaml compiler versions."

Tasks are later translated into more specific jobs by workers, using the OPAM solver. These jobs are then processed by other workers to generate build objects. The user can then access the jobs outputs and results, and the genarated objects.


type id = [ `Task ] Id.t 
The type for task identifiers. These identifiers are deterministic, i.e. similar tasks will have the same identifiers. This is done by hashing the concatenation of Task.create arguments (after normalisation) and calling Id.digest on the result.
type t 
The type for task values.
type repo = string * Uri.t 
The type for remote opam repositories.
val pp_repo : repo Fmt.t
pp_repository formats a repository.
type pin = string * Uri.t option 
The type for pinned packages. The first argument is a package name, the second one its pin target. It is either a version string, or a Git repository. The target is similar to what would be passed to opam pin add <name> <target>. If the target is not specified, it means --dev.
val pp_pin : pin Fmt.t
pp_pin formats a pin package.
val id : t -> id
id t is t's deterministic identifier. Is it obtaining by hashing a stable representation of t's components.
val packages : t -> Package.t list
packages t's is the list of packages that t wants to install.
val create : ?repos:repo list ->
?pins:pin list ->
?switches:Switch.t list -> ?hosts:Host.t list -> Package.t list -> t
create pkgs is the task of building the packages pkgs on all possible compiler switches and on all possible host configurations. This task can somehow be attenuated by specifying some optional arguments:


val equal : t -> t -> bool
equal is the task equality.
val compare : t -> t -> int
compare compares tasks.
val pp : t Fmt.t
pp formats tasks.
val json : t Jsont.codec
json is the JSON codec for tasks.

Task Status


type status = [ `Cancelled | `Failure | `New | `Pending | `Success ] 
The type for task status.
val pp_status : status Fmt.t
pp_status formats tasks Task.status.
val json_status : status Jsont.codec
json_status is the JSON coded for task status.