The m/=> contract spine for the PORTABLE stratum: the namespaces that must load on the JVM, cljw and cljrs (hive-addon.mount.portable-test derives them), plus the malli-free pure namespaces beside them.
Every contract lives HERE rather than beside its function for the reason
hive-addon.opaque.contracts gives for the kernel tier: those namespaces are
malli-free by admission rule. malli does not load on cljrs (malli.impl.regex
needs deftype) and the portable oracle requires them on all three hosts,
so a (m/=> ...) next to registry.tools/register! would end the three-host
claim. Stating the contracts from outside keeps the stratum lean and the
host fully checked.
Contracts name their subject by its FULLY QUALIFIED symbol. m/=> registers
under the namespace part of the symbol as written, so an alias here would
register the schema under the alias and no instrumentation would reach it.
HOST-ONLY, and loading it is OPTIONAL. Nothing requires this namespace at runtime; the suite loads it (hive-addon.contract-coverage-test) and a host that wants instrumentation may too.
Schemas are referenced as VARS, never registry keywords, so a contract resolves without anyone having installed a registry.
The m/=> contract spine for the PORTABLE stratum: the namespaces that must load on the JVM, cljw and cljrs (hive-addon.mount.portable-test derives them), plus the malli-free pure namespaces beside them. Every contract lives HERE rather than beside its function for the reason hive-addon.opaque.contracts gives for the kernel tier: those namespaces are malli-free by admission rule. malli does not load on cljrs (malli.impl.regex needs `deftype`) and the portable oracle requires them on all three hosts, so a `(m/=> ...)` next to `registry.tools/register!` would end the three-host claim. Stating the contracts from outside keeps the stratum lean and the host fully checked. Contracts name their subject by its FULLY QUALIFIED symbol. `m/=>` registers under the namespace part of the symbol as written, so an alias here would register the schema under the alias and no instrumentation would reach it. HOST-ONLY, and loading it is OPTIONAL. Nothing requires this namespace at runtime; the suite loads it (hive-addon.contract-coverage-test) and a host that wants instrumentation may too. Schemas are referenced as VARS, never registry keywords, so a contract resolves without anyone having installed a registry.
One branch as the store holds it: the registration's select-keys plus who and where.
One branch as the store holds it: the registration's select-keys plus who and where.
One contributed command as registry.commands stores it.
One contributed command as registry.commands stores it.
What tool-contract.check/addon-tools answers: the ctor's tools, or the resolve/call failure as a string.
What tool-contract.check/addon-tools answers: the ctor's tools, or the resolve/call failure as a string.
(fn [branch tool f]) -> f as dispatched, injected by the host.
(fn [branch tool f]) -> f as dispatched, injected by the host.
Invocable code, or a var holding it, as branches/handler? reads it. Drawn as a constant-answering fn, since no generator can draw code.
Invocable code, or a var holding it, as branches/handler? reads it. Drawn as a constant-answering fn, since no generator can draw code.
A host callback: (fn [tool]) -> its handler, or its routes.
A host callback: (fn [tool]) -> its handler, or its routes.
A collection of addon ids, as seeds or closures: a set or a sequence.
A collection of addon ids, as seeds or closures: a set or a sequence.
What a graft routes: a handler, or a verb map of them, either one possibly behind a var. graft! checks the top level only, so leaves stay unnarrowed.
What a graft routes: a handler, or a verb map of them, either one possibly behind a var. graft! checks the top level only, so leaves stay unnarrowed.
A parsed branch path: one keyword per segment, [] for the whole tool.
A parsed branch path: one keyword per segment, [] for the whole tool.
What a caller hands parse-path: "belt hello", ["belt" :hello], :belt or nil.
What a caller hands parse-path: "belt hello", ["belt" :hello], :belt or nil.
A leaf path flatten-graft derives from a verb map. A key that names no keyword (a number, a map) folds to nil instead of throwing.
A leaf path flatten-graft derives from a verb map. A key that names no keyword (a number, a map) folds to nil instead of throwing.
solve's plan, stated over the specs it was GIVEN: :ordered holds those very maps. ms/MountPlan narrows :ordered to full MountSpecs, which is right for the mounter and wrong for hive-addon.composite, which solves projected member specs (id, dependencies, capabilities only).
solve's plan, stated over the specs it was GIVEN: :ordered holds those very maps. ms/MountPlan narrows :ordered to full MountSpecs, which is right for the mounter and wrong for hive-addon.composite, which solves projected member specs (id, dependencies, capabilities only).
A spec as the pure derivations read it: any map. They default every key they read, so narrowing to MountSpec would delete the defaulting branches from the domain.
A spec as the pure derivations read it: any map. They default every key they read, so narrowing to MountSpec would delete the defaulting branches from the domain.
A spec collection. Callers pass vectors and SETS alike (solve folds its input into a set before it reaches edges), so both are the domain.
A spec collection. Callers pass vectors and SETS alike (solve folds its input into a set before it reaches edges), so both are the domain.
A tool name as the command store keys it. The store keys by whatever the host passes, so the branch store does too.
A tool name as the command store keys it. The store keys by whatever the host passes, so the branch store does too.
What registry.tools accepts: its own precondition, :name string and an invokable :handler.
What registry.tools accepts: its own precondition, :name string and an invokable :handler.
What json-safe folds anything into: nil, string, boolean, number, keyword, or vectors / string-or-keyword-keyed maps of the same.
What json-safe folds anything into: nil, string, boolean, number, keyword, or vectors / string-or-keyword-keyed maps of the same.
(fn [next] handler): the middleware an around branch holds.
(fn [next] handler): the middleware an around branch holds.
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 |