package opam-lib
Install
Dune Dependency
Authors
-
TThomas Gazagnaire <thomas@gazagnaire.org>
-
AAnil Madhavapeddy <anil@recoil.org>
-
FFabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
-
FFrederic Tuong <tuong@users.gforge.inria.fr>
-
LLouis Gesbert <louis.gesbert@ocamlpro.com>
-
GGuillem Rieu <guillem.rieu@ocamlpro.com>
-
VVincent Bernardoff <vb@luminar.eu.org>
-
RRoberto Di Cosmo <roberto@dicosmo.org>
Maintainers
Sources
sha256=625767c3465219cc8799aad1449c74279b31686db0821300cfdb92fbff17e9fd
md5=e0688c0cf9a55f93ee93f62d07cf6b74
doc/opam-lib.state/OpamStateConfig/index.html
Module OpamStateConfig
type t = private {
root_dir : OpamFilename.Dir.t;
current_switch : OpamSwitch.t;
switch_from : [ `Env | `Command_line | `Default ];
jobs : int Lazy.t;
dl_jobs : int;
keep_build_dir : bool;
no_base_packages : bool;
build_test : bool;
build_doc : bool;
show : bool;
dryrun : bool;
fake : bool;
makecmd : string Lazy.t;
json_out : string option;
}
type 'a options_fun =
?root_dir:OpamFilename.Dir.t ->
?current_switch:OpamSwitch.t ->
?switch_from:[ `Env | `Command_line | `Default ] ->
?jobs:int Lazy.t ->
?dl_jobs:int ->
?external_tags:string list ->
?keep_build_dir:bool ->
?no_base_packages:bool ->
?build_test:bool ->
?build_doc:bool ->
?show:bool ->
?dryrun:bool ->
?fake:bool ->
?makecmd:string Lazy.t ->
?json_out:string option ->
unit ->
'a
val default : t
val set : t -> t options_fun
val setk : (t -> 'a) -> t -> 'a options_fun
val update : ?noop:_ -> unit options_fun
val init : ?noop:_ -> unit options_fun
Sets the options, reading the environment to get default values when unspecified
val opamroot : ?root_dir:OpamTypes.dirname -> unit -> OpamTypes.dirname
Get the initial opam root value (from default, env or optional argument). This allows to get it before doing the init, which is useful to get the configuration file used to fill some options to init()
val load : OpamTypes.dirname -> OpamFile.Config.t option
Loads the global configuration file, protecting against concurrent writes
val write : OpamTypes.dirname -> OpamFile.Config.t -> unit
Writes the global configuration file, protecting against concurrent reads
val filter_deps : ?dev:bool -> OpamTypes.ext_formula -> OpamTypes.formula
Filters flagged dependencies in an ext_formula using the currently set options (doc, test). Build dependencies are included
val load_defaults : OpamFilename.Dir.t -> bool
Loads the config file from the OPAM root and updates default values for all related OpamXxxConfig modules. Doesn't read the env yet, the init
functions should still be called afterwards. OpamFormat should be initialised beforehand, as it may impact the config file loading.
Returns true if a config file was found and could be read, false otherwise