The injected-spec registry: MountSpecs that reached the running image by hot injection rather than by being on the classpath at boot.
Why it exists. An injected addon's manifest lives under a URL added to ONE DynamicClassLoader — the injecting thread's. Classpath discovery run from any other thread (an MCP request thread, a reload triggered by a file watcher) never sees it, so the addon silently drops out of every later reload, doctor report and effective-spec computation. Remembering the spec as DATA, keyed by addon id, and unioning it into discovery makes an injected addon a first-class citizen for the rest of the image's life — until it is ejected.
Strata: Value object InjectedEntry {:addon/id .. :spec MountSpec :hot/path .. :hot/paths [..] :hot/classpath [url ..] :hot/dirs [dir ..]} Pure union-specs, entries-for-path Boundary remember! / forget! / entries / injected-specs over one atom
Portable stratum: no reader conditionals, no host API.
The injected-spec registry: MountSpecs that reached the running image by
hot injection rather than by being on the classpath at boot.
Why it exists. An injected addon's manifest lives under a URL added to ONE
DynamicClassLoader — the injecting thread's. Classpath discovery run from any
other thread (an MCP request thread, a reload triggered by a file watcher)
never sees it, so the addon silently drops out of every later reload, doctor
report and effective-spec computation. Remembering the spec as DATA, keyed by
addon id, and unioning it into discovery makes an injected addon a first-class
citizen for the rest of the image's life — until it is ejected.
Strata:
Value object InjectedEntry {:addon/id .. :spec MountSpec :hot/path ..
:hot/paths [..] :hot/classpath [url ..]
:hot/dirs [dir ..]}
Pure union-specs, entries-for-path
Boundary remember! / forget! / entries / injected-specs over one atom
Portable stratum: no reader conditionals, no host API.(entries)Every remembered InjectedEntry, ordered by id.
Every remembered InjectedEntry, ordered by id.
(entries-for-path entries path)Entries injected from PATH (compared as given — callers canonicalize).
Entries injected from PATH (compared as given — callers canonicalize).
(entry id)The InjectedEntry for ID, or nil.
The InjectedEntry for ID, or nil.
(forget! ids)Drop IDS. Returns the ids that were actually remembered.
Drop IDS. Returns the ids that were actually remembered.
(injected-specs)The remembered MountSpecs, ordered by id.
The remembered MountSpecs, ordered by id.
One injected addon, as remembered. Open.
One injected addon, as remembered. Open.
(remember! entries)Record ENTRIES (InjectedEntry maps). Re-injecting an id replaces its entry. Returns the remembered ids.
Record ENTRIES (InjectedEntry maps). Re-injecting an id replaces its entry. Returns the remembered ids.
(reset-registry!)Forget everything. For tests.
Forget everything. For tests.
(union-specs classpath injected)CLASSPATH specs plus every INJECTED spec whose id the classpath does not already answer. The classpath wins a tie: a spec that is on the classpath is the authoritative manifest, the injected one only a memory of it.
CLASSPATH specs plus every INJECTED spec whose id the classpath does not already answer. The classpath wins a tie: a spec that is on the classpath is the authoritative manifest, the injected one only a memory of it.
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 |