Liking cljdoc? Tell your friends :D
Clojure only.

meme.loader

Namespace loader for registered languages. Intercepts clojure.core/load to search for source files with registered extensions on the classpath. When found, the source is loaded through the lang's :run function.

Any lang registered via meme.registry with an :extension and :run function gets require support automatically.

Installed implicitly by run-file and the REPL — no manual setup.

Security: a denylist prevents interception of core infrastructure namespaces (clojure., java., etc.). Only user/library namespaces are eligible for lang-based loading.

Concurrency: install!/uninstall! serialize on a shared monitor. A load counter tracks in-flight lang-loads across threads so that uninstall! cannot tear down the var overrides while another thread is mid-load. See uninstall! for the throw contract.

Namespace loader for registered languages.
Intercepts clojure.core/load to search for source files with
registered extensions on the classpath. When found, the source
is loaded through the lang's :run function.

Any lang registered via meme.registry with an :extension and :run
function gets require support automatically.

Installed implicitly by run-file and the REPL — no manual setup.

Security: a denylist prevents interception of core infrastructure
namespaces (clojure.*, java.*, etc.). Only user/library namespaces
are eligible for lang-based loading.

Concurrency: install!/uninstall! serialize on a shared monitor. A
load counter tracks in-flight lang-loads across threads so that
uninstall! cannot tear down the var overrides while another thread
is mid-load. See `uninstall!` for the throw contract.
raw docstring

install!clj

(install!)

Install the lang-aware loader. Idempotent — safe to call multiple times and safe to call concurrently from multiple threads. After this, (require 'my.ns) searches all registered lang extensions. On Babashka, require-based loading is not supported (SCI bypasses clojure.core/load).

Install the lang-aware loader. Idempotent — safe to call multiple times
and safe to call concurrently from multiple threads.
After this, (require 'my.ns) searches all registered lang extensions.
On Babashka, require-based loading is not supported (SCI bypasses
clojure.core/load).
sourceraw docstring

uninstall!clj

(uninstall!)

Uninstall the loader, restoring the original clojure.core/load and clojure.core/load-file.

Throws ex-info with {:reason :active-load, :in-flight N} if any thread — including the calling thread — is currently inside a lang-load. This prevents tearing down the var overrides while another thread is mid-load.

Thread-safe: serialized with install! on a shared monitor. Safe to call concurrently with itself (second caller sees installed? false and is a no-op).

Uninstall the loader, restoring the original clojure.core/load and
clojure.core/load-file.

Throws ex-info with {:reason :active-load, :in-flight N} if any thread
— including the calling thread — is currently inside a lang-load. This
prevents tearing down the var overrides while another thread is mid-load.

Thread-safe: serialized with install! on a shared monitor. Safe to call
concurrently with itself (second caller sees installed? false and is a
no-op).
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