Liking cljdoc? Tell your friends :D

com.blockether.vis.internal.extension.native-preload

Build-time reachability for everything the engine loads DYNAMICALLY.

The manifest resolves an entrypoint with requiring-resolve, a pack reaches its own optional half the same way (voice's ASR), and a native image contains only what the BUILDER saw. A namespace nobody loads while the image is built therefore has no class in the binary, and the first command that wants it dies with "Could not locate ...__init.class on classpath" - on a binary whose JVM run is perfectly healthy. Loading them here puts them in clojure.lang.RT's namespace map, which IS part of the image heap, so the same resolve at run time finds them already loaded.

NOTHING requires this namespace. Vis' native-image.properties names its __init class in --initialize-at-build-time, so the builder loads it outside any other namespace's load: an entrypoint requiring the engine back would otherwise create a cycle. A JVM run never loads this file, so manifest registration stays lazy.

The engine namespace list is derived from the manifest's entrypoints and the compiled namespace tree. Formatter and analyzer dependencies are required here: JVM registration defers them, but the native image must retain their code.

Build-time reachability for everything the engine loads DYNAMICALLY.

The manifest resolves an entrypoint with `requiring-resolve`, a pack reaches
its own optional half the same way (voice's ASR), and a
native image contains only what the BUILDER saw. A namespace nobody loads
while the image is built therefore has no class in the binary, and the first
command that wants it dies with "Could not locate ...__init.class on
classpath" - on a binary whose JVM run is perfectly healthy. Loading them
here puts them in `clojure.lang.RT`'s namespace map, which IS part of the
image heap, so the same resolve at run time finds them already loaded.

NOTHING requires this namespace. Vis' `native-image.properties` names its
`__init` class in `--initialize-at-build-time`, so the builder loads it outside
any other namespace's load: an entrypoint requiring the engine back would
otherwise create a cycle. A JVM run never
loads this file, so manifest registration stays lazy.

The engine namespace list is derived from the manifest's entrypoints and the
compiled namespace tree. Formatter and analyzer dependencies are required here:
JVM registration defers them, but the native image must retain their code.
raw docstring

compiled-namespacesclj

(compiled-namespaces)

Every namespace this distribution AOT-compiled, read off the class path the image builder was handed. <ns>__init.class is the only class Clojure emits per namespace, so the tree IS the list and nothing has to be maintained.

Every namespace this distribution AOT-compiled, read off the class path the
image builder was handed. `<ns>__init.class` is the only class Clojure emits
per namespace, so the tree IS the list and nothing has to be maintained.
sourceraw docstring

preload!clj

(preload!)

Load every namespace the image must keep. Any failure aborts the build: stepping over one produces an apparently successful image that cannot initialize the affected extension and usually poisons every namespace that requires it.

Load every namespace the image must keep. Any failure aborts the build: stepping
over one produces an apparently successful image that cannot initialize the
affected extension and usually poisons every namespace that requires it.
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