Liking cljdoc? Tell your friends :D

hive-addon.hot.source

Where an addon's constructor namespace physically lives — the Collect stratum of the hot-reload bridge.

An addon wired as a :local/root dep (typically through an untracked local.deps.edn override) puts its src on the classpath as a real DIRECTORY: the bytes on disk can change, so clj-reload can watch and reload it. The same addon consumed as an :mvn/version coordinate arrives inside a JAR, whose bytes cannot change without a restart — hot-reload of it is not merely unsupported, it is meaningless.

That distinction is the input to strategy selection, so it is resolved here as DATA (an AddonSource) rather than guessed at the reload site.

Pure apart from classpath lookup; never throws — an unresolvable namespace becomes {:hot/source-kind :absent}.

Where an addon's constructor namespace physically lives — the Collect stratum
of the hot-reload bridge.

An addon wired as a `:local/root` dep (typically through an untracked
local.deps.edn override) puts its `src` on the classpath as a real DIRECTORY:
the bytes on disk can change, so clj-reload can watch and reload it. The same
addon consumed as an `:mvn/version` coordinate arrives inside a JAR, whose
bytes cannot change without a restart — hot-reload of it is not merely
unsupported, it is meaningless.

That distinction is the input to strategy selection, so it is resolved here as
DATA (an AddonSource) rather than guessed at the reload site.

Pure apart from classpath lookup; never throws — an unresolvable namespace
becomes {:hot/source-kind :absent}.
raw docstring

ns->base-pathclj

(ns->base-path ns-str)

Munge a namespace name into its classpath path stem (no extension). hive-carto.carto-init -> hive_carto/carto_init.

Munge a namespace name into its classpath path stem (no extension).
`hive-carto.carto-init` -> `hive_carto/carto_init`.
sourceraw docstring

ns->resource-pathsclj

(ns->resource-paths ns-str)

Candidate classpath resource paths for a namespace, in load order.

Candidate classpath resource paths for a namespace, in load order.
sourceraw docstring

resolve-sourceclj

(resolve-source ns-str)

Resolve where ns-str's source lives on the classpath.

Returns an AddonSource-shaped map WITHOUT :addon/id (the caller stamps that): {:addon/init-ns ns-str :hot/source-kind :directory | :jar | :absent :hot/reloadable? bool :hot/source-dir <classpath root, :directory only> :hot/source-url <resolved URL string, when found>}

Never throws — a namespace whose source is absent from the classpath (AOT-only or dynamically generated) resolves to :absent, which is a strategy input, not an error.

Resolve where `ns-str`'s source lives on the classpath.

Returns an AddonSource-shaped map WITHOUT :addon/id (the caller stamps that):
  {:addon/init-ns   ns-str
   :hot/source-kind :directory | :jar | :absent
   :hot/reloadable? bool
   :hot/source-dir  <classpath root, :directory only>
   :hot/source-url  <resolved URL string, when found>}

Never throws — a namespace whose source is absent from the classpath (AOT-only
or dynamically generated) resolves to :absent, which is a strategy input, not
an error.
sourceraw docstring

sourcesclj

(sources specs)

Resolve every spec's AddonSource. Returns a vector in spec order.

Resolve every spec's AddonSource. Returns a vector in spec order.
sourceraw docstring

spec-sourceclj

(spec-source spec)

Resolve the AddonSource for a MountSpec, stamped with its :addon/id.

Resolve the AddonSource for a MountSpec, stamped with its :addon/id.
sourceraw docstring

watchable-dirsclj

(watchable-dirs specs)

The set of classpath-root directories among specs that clj-reload can watch.

This is what a consumer feeds hive-hot's :dirs: only addons wired by :local/root contribute, because only they have source on disk. Jar-backed and absent addons contribute nothing and are simply not watched.

The set of classpath-root directories among `specs` that clj-reload can watch.

This is what a consumer feeds hive-hot's `:dirs`: only addons wired by
`:local/root` contribute, because only they have source on disk. Jar-backed
and absent addons contribute nothing and are simply not watched.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close