Pure lifecycle decisions over a spec set: which addons mount at boot, which stay dormant, what an activation must mount, and what a sweep may evict. No IO, no clock, no host. Time arrives as a number.
Dependency edges come from hive-addon.mount.solve/edges, the same rule chain the mounter orders by, so a lifecycle decision can never disagree with a mount order.
Portable stratum: no reader conditionals, no for, only self-evaluating
:or defaults (see hive-addon.mount.solve).
Pure lifecycle decisions over a spec set: which addons mount at boot, which stay dormant, what an activation must mount, and what a sweep may evict. No IO, no clock, no host. Time arrives as a number. Dependency edges come from hive-addon.mount.solve/edges, the same rule chain the mounter orders by, so a lifecycle decision can never disagree with a mount order. Portable stratum: no reader conditionals, no `for`, only self-evaluating `:or` defaults (see hive-addon.mount.solve).
(activation-ids specs id active?)What mounting ID requires: ID and its transitive dependencies that are not ACTIVE? yet, in mount order.
What mounting ID requires: ID and its transitive dependencies that are not ACTIVE? yet, in mount order.
(boot-partition specs lifecycles surface-of)Split SPECS into what mounts at boot and what stays dormant.
LIFECYCLES is {id Lifecycle}; SURFACE-OF answers an id's Surface or nil.
A :lazy addon is downgraded to eager when :no-surface nothing can be advertised for it, so nothing can try it :required-by-eager something mounted at boot depends on it
Returns {:eager [id ...] in mount order, :dormant [id ...] sorted, :downgraded {id reason}}.
Split SPECS into what mounts at boot and what stays dormant.
LIFECYCLES is {id Lifecycle}; SURFACE-OF answers an id's Surface or nil.
A :lazy addon is downgraded to eager when
:no-surface nothing can be advertised for it, so nothing can try it
:required-by-eager something mounted at boot depends on it
Returns {:eager [id ...] in mount order, :dormant [id ...] sorted,
:downgraded {id reason}}.(dependency-closure specs ids)IDS plus every addon they transitively depend on, within SPECS.
IDS plus every addon they transitively depend on, within SPECS.
(dependent-closure specs ids)IDS plus every addon that transitively depends on them, within SPECS.
IDS plus every addon that transitively depends on them, within SPECS.
(resolve-all specs opts){addon-id Lifecycle} for SPECS. OPTS: {:defaults decl :overrides {id decl}}.
{addon-id Lifecycle} for SPECS. OPTS: {:defaults decl :overrides {id decl}}.
(resolve-lifecycle spec defaults override)The Lifecycle for SPEC. Precedence, strongest first: the per-id OVERRIDE, the manifest's :addon/lifecycle, the host DEFAULTS decl, the built-ins. A key a layer cannot honour is ignored in that layer.
The Lifecycle for SPEC. Precedence, strongest first: the per-id OVERRIDE, the manifest's :addon/lifecycle, the host DEFAULTS decl, the built-ins. A key a layer cannot honour is ignored in that layer.
(sweep-plan now specs states)What a sweep at NOW may evict. STATES is {id UseState}.
An idle addon is still kept while any ACTIVE addon depends on it. Evicting a dependent frees its dependencies in the same sweep, so the plan is a fixpoint and :evict is ordered dependents-first.
Returns a SweepPlan.
What a sweep at NOW may evict. STATES is {id UseState}.
An idle addon is still kept while any ACTIVE addon depends on it. Evicting a
dependent frees its dependencies in the same sweep, so the plan is a fixpoint
and :evict is ordered dependents-first.
Returns a SweepPlan.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |