Expand description
Shared versioned-symbol/namespace resolution service.
This is the single implementation used by every execution tier — the
tree-walking interpreter, the IR interpreter, JIT-compiled code (via the
rt_load_global* runtime bridges), and AOT binaries.
§Model
Resolving ns/name@commit means: ensure the versioned namespace
"ns@commit" is loaded (lazily, from an embedded builtin source or from
git history), then perform a plain lookup_in_ns("ns@commit", name).
Versioned namespaces are immutable once loaded, so a resolved value never
changes for the lifetime of the process.
§Native (Rust-backed) functions
Native functions registered via cljrs-interop::Registry have no Clojure
source to fetch, and the binary is a single unit at runtime — we can’t
“go back in time” to a previous compiled implementation. The current
contract is: versioned lookups of a native symbol resolve to the HEAD
(current) implementation regardless of the requested commit (see
native_head_fallback).
Functions§
- base_
ns_ name - Strip a trailing
@<commit>suffix from a namespace name, returning the base namespace."my.lib@abc1234"→"my.lib"; names without a valid commit-hash suffix are returned unchanged. - ensure_
versioned_ ns_ loaded - Ensure the versioned namespace
"<base_ns>@<commit>"is loaded, returning its name. - pin_
if_ available - Pin
base_ns@commitif any source for it is locatable, returning whether it was loaded. - resolve_
versioned_ value - Resolve the value of
namepinned atcommit.