genied.classloader
Classloader functions. Mostly related to dynamic class loaders and the system root loader.
bind-root-loader
(bind-root-loader)
Bind Compiler/LOADER to a new one. This stays fixed in server and later client calls. Use (baseloader) as parent. Return newly created classloader
det-deps-edn
(det-deps-edn {:keys [deps]} script)
Determine deps.edn file based on script and ctx. Also check parent dir of script, when default src-dir is used
ensure-dynamic-classloader
(ensure-dynamic-classloader)
Ensure the current thread has a Clojure DynamicClassLoader. Return the classloader after possibly changing it.
init-dynamic-classloader!
(init-dynamic-classloader!)
Ensure the system/server has a dynamic classloader. And keep it in an atom, so clients may use it. This version uses the (dynamic) classloader of ndevreeze.cmdline/check-and-exec
load-libraries
(load-libraries opt)
Load libraries from a deps.edn file. Either at daemon start time or at script exec time
load-library
(load-library lib version)
(load-library lib version classloader)
Dynamically load a library, using Pomegranate for now. Use global classloader as set in init-dynamic-classloader! lib - symbol, eg ’ndevreeze/logger version - string, eg “0.2.0”
load-script-libraries
(load-script-libraries ctx script)
Load libraries as found in deps.edn in script-dir or ctx
load-startup-libraries
(load-startup-libraries opt)
Load libraries as given in daemon startup config
mark-project-libraries
(mark-project-libraries)
Mark libraries in project.clj as loaded. So they won’t be loaded again, either from server or client/script.
set-dynamic-classloader!
(set-dynamic-classloader!)
Set global classloader on current (client) thread. And also on the loader, if this is possible. Return the set classloader