Schema-driven hot-reload registration — the hive-hot leg of the malli macro
layer. reg-hot-schema coerces + validates a component's opts against ONE
malli schema before hive-hot.core/reg-hot stores them: declare the component's
opts schema once and its guard is wired, replacing the ad-hoc :pre check with a
real value-object contract.
hive-hot does not depend on hive-spi/malli; derive/compile-op is resolved LAZILY via a guarded requiring-resolve. When it is unresolvable (hive-spi absent) opts pass through and reg-hot's own :pre still guards :ns — registration never fails on a bare classpath.
Schema-driven hot-reload registration — the hive-hot leg of the malli macro layer. `reg-hot-schema` coerces + validates a component's opts against ONE malli schema before hive-hot.core/reg-hot stores them: declare the component's opts schema once and its guard is wired, replacing the ad-hoc :pre check with a real value-object contract. hive-hot does not depend on hive-spi/malli; derive/compile-op is resolved LAZILY via a guarded requiring-resolve. When it is unresolvable (hive-spi absent) opts pass through and reg-hot's own :pre still guards :ns — registration never fails on a bare classpath.
malli value-object for a hot-reload component's opts (the shape reg-hot expects): a required :ns symbol and optional, nil-able :on-reload / :on-error callables (any IFn).
malli value-object for a hot-reload component's opts (the shape reg-hot expects): a required :ns symbol and optional, nil-able :on-reload / :on-error callables (any IFn).
A source root as a caller spelled it.
A source root as a caller spelled it.
What hive-hot.core/extend-init! answers: the tracked dirs after the call and the ones it newly added, in the caller's spelling.
What hive-hot.core/extend-init! answers: the tracked dirs after the call and the ones it newly added, in the caller's spelling.
(reg-hot-schema component-id opts)(reg-hot-schema component-id schema opts)Register a hot-reload component whose opts are coerced + validated against a
malli schema (a registered schema-key or an inline malli form; defaults to
component-schema) before hive-hot.core/reg-hot stores them. An invalid opts
map throws {:error :schema/invalid ...} before registration. When hive-spi is
absent, opts pass through unchecked (reg-hot's :pre still guards). Returns the
component-id.
Register a hot-reload component whose `opts` are coerced + validated against a
malli `schema` (a registered schema-key or an inline malli form; defaults to
`component-schema`) before hive-hot.core/reg-hot stores them. An invalid opts
map throws {:error :schema/invalid ...} before registration. When hive-spi is
absent, opts pass through unchecked (reg-hot's :pre still guards). Returns the
component-id.What hive-hot.core/remove-dirs! answers — the contract a plug-out (e.g. hive-addon's eject!) reads. Every requested dir is in exactly one of :removed :kept :absent, in the caller's spelling.
:removed no longer tracked nor watched :kept still tracked: a core dir (the initial init declared it), or one another owner still claims (then also in :shared) :absent was not tracked; nothing done :dirs every tracked dir after the call :shared {kept-dir [other-owner ...]} for the kept dirs another owner holds
What hive-hot.core/remove-dirs! answers — the contract a plug-out (e.g.
hive-addon's eject!) reads. Every requested dir is in exactly one of
:removed :kept :absent, in the caller's spelling.
:removed no longer tracked nor watched
:kept still tracked: a core dir (the initial init declared it), or one
another owner still claims (then also in :shared)
:absent was not tracked; nothing done
:dirs every tracked dir after the call
:shared {kept-dir [other-owner ...]} for the kept dirs another owner holdscljdoc 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 |