Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Module OpamStateTypes
Defines the types holding global, repository and switch states
Client state
Phantom types to indicate the locking state of a state, and allow or not on-disk operations.
Note that each state load is itself locking enough to return a consistent state: a read lock is only needed when the consistency of the actions depend on the fact that the given state doesn't change during the run (e.g. an update that depends on it). In particular, all query commands don't need a read lock.
Subtyping is by guarantees given on the operations allowed, rw giving the most and being the smallest type, so that it is safe to coerce (rw t :> ro t).
type rw = [
| `Lock_write
]
Phantom type for readwrite-locked state (ensures that there are no concurrent reads or writes)
The global opam root path (caution: this is stored here but some code may rely on OpamStateConfig.t.root_dir ; in other words, multiple root handling isn't really supported at the moment)
The main configuration file. A note of caution: this corresponds to the configuration as loaded from the file: to get the current options, which may be overridden through the command-line or environment, see OpamStateConfig
A map of variables that have been defined globally, e.g. through `.opam/config`. They may need evaluation so are stored as lazy values. The extra string is the supplied variable documentation
If the global config was upgraded on-the-fly, indicates if the either the repo or switch config require the global config to be written (i.e. a hard upgrade to the global config)
The packages that form the base of the current compiler. Normally equal to the subset of installed packages matching the invariant defined in switch_config
The metadata of all packages, gathered from repo, local cache and pinning overlays. This includes URL and descr data (even if they were originally in separate files), as well as the original metadata directory (that can be used to retrieve the files/ subdir)
The set of packages explicitly installed by the user. Some of them may happen not to be installed at some point, but this indicates that the user would like them installed.
The set of packages which are installed but no longer valid, e.g. because of removed system dependencies. Only packages which are unavailable end up in this set, they are otherwise put in reinstall.