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 outside the wire-safe set (plain EDN scalars/colls plus the transit-carried leaves: char, UUID, exact java.util.Date) is shipped as {::nonedn true ::class <class-handle>} — regex Patterns, fn objects, Vars, Namespaces, and any project-runtime object a data reader produced (a joda DateTime from a tagged literal). The host types it by its class via the carried handle; it never inspects the original value. The transport's default-handler backstop ships anything that slips past projection as {::nonedn true ::class-name <name> ::string <print>} — same host typing, name resolved to a handle lazily.

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
outside the wire-safe set (plain EDN scalars/colls plus the transit-carried
leaves: char, UUID, exact java.util.Date) is shipped as
`{::nonedn true ::class <class-handle>}` — regex Patterns, fn objects, Vars,
Namespaces, and any project-runtime object a data reader produced (a joda
DateTime from a tagged literal). The host types it by its class via the
carried handle; it never inspects the original value. The transport's
default-handler backstop ships anything that slips past projection as
`{::nonedn true ::class-name <name> ::string <print>}` — same host typing,
name resolved to a handle lazily.

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 projection-built non-EDN sentinel; nil on a backstop sentinel.

The class handle carried by a projection-built non-EDN sentinel; nil on a
backstop 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 (projection- or backstop-built).

True when `v` is a non-EDN sentinel map (projection- or backstop-built).
sourceraw docstring

opaque-class-nameclj

(opaque-class-name v)

The class name string carried by a backstop sentinel; nil on a projection-built sentinel.

The class name string carried by a backstop sentinel; nil on a
projection-built sentinel.
sourceraw docstring

opaque-sentinelclj

(opaque-sentinel class-name string)

Build a non-EDN sentinel from the transit default-handler backstop: it carries the value's class NAME and guarded print string, never a handle — the marshaller cannot intern handles. The host resolves the name to a handle lazily (class-oracle resolve-class-sym) when it types the value.

Build a non-EDN sentinel from the transit default-handler backstop: it
carries the value's class NAME and guarded print string, never a handle —
the marshaller cannot intern handles. The host resolves the name to a
handle lazily (class-oracle `resolve-class-sym`) when it types the value.
sourceraw docstring

opaque-stringclj

(opaque-string v)

The guarded print string carried by a backstop sentinel.

The guarded print string carried by a backstop sentinel.
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