Dkml_install_register.Component_registrySourceThe Component_registry is a global registry of all components that have been registered until now.
Component authors should follow this sequence:
open Dkml_install_api
module Component : Component_config = struct
include Default_component_config
let component_name = "...the..component..name..."
(** Redefine any other values you want to override *)
end
let reg = Component_registry.get ()
let () = Component_registry.add_component reg (module Component : Component_config)The type of the component registry
The type of the component selector. Either all components, or just the specified components plus all of their dependencies.
val add_component :
?raise_on_error:bool ->
t ->
(module Dkml_install_api.Component_config) ->
unitadd_component ?raise_on_error registry component adds the component to the registry.
Ordinarily if there is an error a process exit is performed. Set raise_on_error to true to raise an Invalid_argument error instead.
val validate :
?raise_on_error:bool ->
t ->
Dkml_install_register__.Register_types.install_direction ->
unitvalidate ?raise_on_error registry direction succeeds if and only if all dependencies of all add_component registry have been themselves added.
Ordinarily if there is an error a process exit is performed. Set raise_on_error to true to raise an Invalid_argument error instead.
val install_eval :
t ->
selector:component_selector ->
f:
((module Dkml_install_api.Component_config) ->
'a Dkml_install_api.Forward_progress.t) ->
fl:Dkml_install_api.Forward_progress.fatal_logger ->
'a list Dkml_install_api.Forward_progress.tinstall_eval registry ~f ~fl iterates through the registry in dependency order using component's Dkml_install_api.Component_config.install_depends_on value, executing function f on each component configuration.
Errors will go to the fatal logger fl.
val uninstall_eval :
t ->
selector:component_selector ->
f:
((module Dkml_install_api.Component_config) ->
'a Dkml_install_api.Forward_progress.t) ->
fl:Dkml_install_api.Forward_progress.fatal_logger ->
'a list Dkml_install_api.Forward_progress.tuninstall_eval registry ~f ~fl iterates through the registry in reverse dependency order using component's Dkml_install_api.Component_config.install_depends_on value, executing function f on each component configuration.
Errors will go to the fatal logger fl.