package opam-client

  1. Overview
  2. Docs

Configuration options for the client lib (record, global reference, setter, initialisation), plus helper for global setup

type t = private {
  1. print_stats : bool;
  2. pin_kind_auto : bool;
  3. autoremove : bool;
  4. editor : string;
  5. external_tags : string list;
  6. keep_build_dir : bool;
  7. reuse_build_dir : bool;
  8. inplace_build : bool;
  9. working_dir : bool;
  10. show : bool;
  11. fake : bool;
  12. skip_dev_update : bool;
  13. json_out : string option;
  14. root_is_ok : bool;
  15. no_auto_upgrade : bool;
}
type 'a options_fun = ?print_stats:bool -> ?pin_kind_auto:bool -> ?autoremove:bool -> ?editor:string -> ?external_tags:string list -> ?keep_build_dir:bool -> ?reuse_build_dir:bool -> ?inplace_build:bool -> ?working_dir:bool -> ?show:bool -> ?fake:bool -> ?skip_dev_update:bool -> ?json_out:string option -> ?root_is_ok:bool -> ?no_auto_upgrade:bool -> 'a
include OpamStd.Config.Sig with type t := t and type 'a options_fun := 'a options_fun
val default : t

The default values of the options to use at startup

val set : t -> (unit -> t) options_fun

Use to update any option in a t, using the optional arguments of options_fun. E.g. set opts ?option1:1 ?option4:"x" ()

val setk : (t -> 'a) -> t -> 'a options_fun

Same as set, but passes the result to a continuation, allowing argument stacking

The global reference containing the currently set library options. Access using OpamXxxConfig.(!r.field).

val update : ?noop:_ -> (unit -> unit) options_fun

Updates the currently set options in r according to the optional arguments

val init : ?noop:_ -> (unit -> unit) options_fun

Sets the options, reading the environment to get default values when unspecified

val initk : 'a -> 'a options_fun

Sets the options like init, but returns the given value (for arguments stacking)

val search_files : string list

Extra files included in opam search

val opam_init : ?root_dir:OpamTypes.dirname -> ?strict:bool -> ?skip_version_checks:bool -> ?all_parens:bool -> ?log_dir:OpamTypes.dirname -> ?print_stats:bool -> ?pin_kind_auto:bool -> ?autoremove:bool -> ?editor:string -> ?external_tags:string list -> ?keep_build_dir:bool -> ?reuse_build_dir:bool -> ?inplace_build:bool -> ?working_dir:bool -> ?show:bool -> ?fake:bool -> ?skip_dev_update:bool -> ?json_out:string option -> ?root_is_ok:bool -> ?no_auto_upgrade:bool -> ?current_switch:OpamSwitch.t -> ?switch_from:[ `Command_line | `Default | `Env ] -> ?jobs:int Lazy.t -> ?dl_jobs:int -> ?build_test:bool -> ?build_doc:bool -> ?dryrun:bool -> ?makecmd:string Lazy.t -> ?ignore_constraints_on:OpamPackage.Name.Set.t -> ?cudf_file:string option -> ?solver_timeout:float -> ?external_solver:OpamTypes.arg list option Lazy.t -> ?best_effort:bool -> ?solver_preferences_default:string option Lazy.t -> ?solver_preferences_upgrade:string option Lazy.t -> ?solver_preferences_fixup:string option Lazy.t -> ?download_tool: (OpamTypes.arg list * OpamRepositoryConfig.dl_tool_kind) Lazy.t -> ?validation_hook:OpamTypes.arg list option -> ?retries:int -> ?force_checksums:bool option -> ?debug_level:int -> ?verbose_level:int -> ?color:[ `Always | `Auto | `Never ] -> ?utf8:[ `Always | `Auto | `Extended | `Never ] -> ?disp_status_line:[ `Always | `Auto | `Never ] -> ?answer:bool option -> ?safe_mode:bool -> ?keep_log_dir:bool -> ?errlog_length:int -> ?merged_output:bool -> ?use_openssl:bool -> ?precise_tracking:bool -> unit -> unit

Load the global configuration file (opamroot/config) and initialise all opam sub-libraries, overriding the given arguments

OCaml

Innovation. Community. Security.