Liking cljdoc? Tell your friends :D

skeptic.worker.wire

Host-safe wire-contract constants shared by both JVMs. Holds ONLY the keys and accessors for values that cross the worker->host AST boundary; carries no nREPL, tools.analyzer, or other worker-classpath dependency, so the host may require it without re-coupling to worker-only code.

The non-EDN sentinel: a raw analyzer-AST :val/:form/:raw-forms leaf that is not EDN-readable (regex Pattern, fn object, Var, Namespace) is shipped as {::nonedn true ::class <class-handle>}. The host types it by its class via the carried handle; it never inspects the original value.

Form metadata: the worker captures the host-read meta keys off each form into a plain data vector in clojure.walk/postwalk order (capture-form-meta); the host replays them onto the structurally-identical received form in the same order (apply-form-meta). Shape is never altered, so structural form walks survive.

Host-safe wire-contract constants shared by both JVMs. Holds ONLY the keys
and accessors for values that cross the worker->host AST boundary; carries no
nREPL, tools.analyzer, or other worker-classpath dependency, so the host may
require it without re-coupling to worker-only code.

The non-EDN sentinel: a raw analyzer-AST `:val`/`:form`/`:raw-forms` leaf that
is not EDN-readable (regex Pattern, fn object, Var, Namespace) is shipped as
`{::nonedn true ::class <class-handle>}`. The host types it by its class via
the carried handle; it never inspects the original value.

Form metadata: the worker captures the host-read meta keys off each form into
a plain data vector in `clojure.walk/postwalk` order (`capture-form-meta`);
the host replays them onto the structurally-identical received form in the
same order (`apply-form-meta`). Shape is never altered, so structural form
walks survive.
raw docstring

apply-ast-form-metaclj

(apply-ast-form-meta ast metas)

Replay metas (from capture-ast-form-meta) onto each AST node's :form along the same :children spine, in the same order, with-meta-ing where a node carried captured metadata.

Replay `metas` (from `capture-ast-form-meta`) onto each AST node's `:form`
along the same `:children` spine, in the same order, `with-meta`-ing where a
node carried captured metadata.
sourceraw docstring

apply-form-metaclj

(apply-form-meta form metas)

Replay metas (from capture-form-meta) onto form in postwalk order, with-meta-ing each IObj node that had captured metadata. form must be the same shape capture-form-meta saw, so the postwalk visit order matches.

Replay `metas` (from `capture-form-meta`) onto `form` in postwalk order,
`with-meta`-ing each IObj node that had captured metadata. `form` must be the
same shape `capture-form-meta` saw, so the postwalk visit order matches.
sourceraw docstring

capture-ast-form-metaclj

(capture-ast-form-meta ast)

Collect each AST node's (meta (:form node)) (host-read keys only) into a plain EDN vector, visiting nodes along the :children spine in handle-project-node order. Pairs with apply-ast-form-meta. The form metadata of cljs AST nodes carries the source location node-location reads; capturing it along the safe :children spine avoids the runaway full AST walk and keeps the host-side contract explicit.

Collect each AST node's `(meta (:form node))` (host-read keys only) into a
plain EDN vector, visiting nodes along the `:children` spine in
`handle-project-node` order. Pairs with `apply-ast-form-meta`. The form
metadata of cljs AST nodes carries the source location `node-location`
reads; capturing it along the safe `:children` spine avoids the runaway full
AST walk and keeps the host-side contract explicit.
sourceraw docstring

capture-form-metaclj

(capture-form-meta form)

Walk form in postwalk order, collecting each node's host-read metadata (or nil) into a plain EDN vector. Pairs with apply-form-meta, which replays the vector onto a structurally-identical form in the same order.

Walk `form` in postwalk order, collecting each node's host-read metadata (or
nil) into a plain EDN vector. Pairs with `apply-form-meta`, which replays the
vector onto a structurally-identical form in the same order.
sourceraw docstring

form-meta-keysclj

The form-metadata keys the host reads back off received :form/:source-form values: source location (node-location/form-location), the raw source text (form-source), and the user ^{:skeptic/type T} override (annotate).

The form-metadata keys the host reads back off received `:form`/`:source-form`
values: source location (`node-location`/`form-location`), the raw source text
(`form-source`), and the user `^{:skeptic/type T}` override (annotate).
sourceraw docstring

nonedn-classclj

(nonedn-class v)

The class handle carried by a non-EDN sentinel.

The class handle carried by a non-EDN sentinel.
sourceraw docstring

nonedn-sentinelclj

(nonedn-sentinel class-handle)

Build a non-EDN sentinel carrying the opaque class handle class-handle.

Build a non-EDN sentinel carrying the opaque class handle `class-handle`.
sourceraw docstring

nonedn?clj

(nonedn? v)

True when v is a non-EDN sentinel map.

True when `v` is a non-EDN sentinel map.
sourceraw docstring

strip-ast-form-metaclj

(strip-ast-form-meta ast)

Drop metadata from each AST node's :form along the safe child spine. Used by cljs projection, where a full tree walk can touch analyzer back-refs.

Drop metadata from each AST node's `:form` along the safe child spine. Used by
cljs projection, where a full tree walk can touch analyzer back-refs.
sourceraw docstring

strip-form-metaclj

(strip-form-meta form)

Drop metadata from every IObj in form after it has been captured into a sidecar. Nippy preserves metadata, so the worker must make the sidecar the only metadata channel.

Drop metadata from every IObj in `form` after it has been captured into a
sidecar. Nippy preserves metadata, so the worker must make the sidecar the
only metadata channel.
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