package opam-state
Install
Dune Dependency
Authors
-
VVincent Bernardoff <vb@luminar.eu.org>
-
RRaja Boujbel <raja.boujbel@ocamlpro.com>
-
RRoberto Di Cosmo <roberto@dicosmo.org>
-
TThomas Gazagnaire <thomas@gazagnaire.org>
-
LLouis Gesbert <louis.gesbert@ocamlpro.com>
-
FFabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
-
AAnil Madhavapeddy <anil@recoil.org>
-
GGuillem Rieu <guillem.rieu@ocamlpro.com>
-
RRalf Treinen <ralf.treinen@pps.jussieu.fr>
-
FFrederic Tuong <tuong@users.gforge.inria.fr>
Maintainers
Sources
md5=abb7d7788f290d81d73b924b307b4bef
sha512=0d8ee19ac0f3df9de4fd9cfa8daab1f7228f090f5e2e7e26bedf24d8c2ab377aade95048f2d7cd9ee9dbbe738729e26dc99f41f730fa2252df74953362464a22
doc/opam-state/OpamStateConfig/index.html
Module OpamStateConfig
Source
Configuration options for the state lib (record, global reference, setter, initialisation)
type t = private {
root_dir : OpamFilename.Dir.t;
current_switch : OpamSwitch.t option;
switch_from : [ `Env | `Command_line | `Default ];
jobs : int Lazy.t;
dl_jobs : int;
build_test : bool;
build_doc : bool;
dryrun : bool;
makecmd : string Lazy.t;
ignore_constraints_on : OpamTypes.name_set;
unlock_base : bool;
no_env_notice : bool;
locked : 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 ->
?build_test:bool ->
?build_doc:bool ->
?dryrun:bool ->
?makecmd:string Lazy.t ->
?ignore_constraints_on:OpamTypes.name_set ->
?unlock_base:bool ->
?no_env_notice:bool ->
?locked:string option ->
'a
include OpamStd.Config.Sig
with type t := t
and type 'a options_fun := 'a options_fun
Get the initial opam root value (from default, env or optional argument). This allows one to get it before doing the init, which is useful to get the configuration file used to fill some options to init()
Loads the global configuration file, protecting against concurrent writes
val load_defaults :
?lock_kind:'a OpamStateTypes.lock ->
OpamFilename.Dir.t ->
OpamFile.Config.t option
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 the config file that was found, if any
Returns the current switch, failing with an error message is none is set.
Returns the current switch, if any is set.
The function used to locate an external switch from parents of the current directory. Takes the opam root as parameter, and rejects any external switch configured with a different root
Checks if a local switch exists and is configurade for the given root
Resolves the switch if it is a link to a global switch in the given root (return unchanged otherwise)
val is_newer_than_self :
?lock_kind:'a OpamStateTypes.lock ->
'b OpamStateTypes.global_state ->
bool
Given the required lock, returns true
if the opam root is newer than the binary, so that it can only be loaded read-only by the current binary.
Check config root version regarding self-defined one
val load_config_root :
?lock_kind:'a OpamStateTypes.lock ->
((OpamFile.Config.t OpamFile.t -> 'b) * (OpamFile.Config.t OpamFile.t -> 'b)) ->
OpamTypes.dirname ->
'b