Files sent to this JVM, put to use. A file sent to (__r/upload-url)
lands staged: an ordinary file in a temporary directory, which nothing
has loaded. What comes next depends on what the JVM runs from. Started
from a checkout, its source files are on disk, and an edited namespace
is moved over the file it replaces and reloaded, exactly as if it had
been edited there. Started from a jar, there is no file to replace, and
the staged file is loaded where it lies.
Files sent to this JVM, put to use. A file sent to `(__r/upload-url)` lands staged: an ordinary file in a temporary directory, which nothing has loaded. What comes next depends on what the JVM runs from. Started from a checkout, its source files are on disk, and an edited namespace is moved over the file it replaces and reloaded, exactly as if it had been edited there. Started from a jar, there is no file to replace, and the staged file is loaded where it lies.
(place! staged)(place! staged root)Move the staged source file staged to where its namespace lives, and
return the namespace symbol — reloading is the caller's, in whatever
way the project reloads.
With staged alone, the file replaces the one its namespace was loaded
from, found on the classpath. Throws when that is not a file on disk —
a namespace living in a jar, or one this JVM has no source for — and
leaves the staged file where it was.
A namespace new to the JVM has no file to replace: name root, the
source directory it belongs under, as the JVM sees it — relative paths
resolve against its working directory.
Move the staged source file `staged` to where its namespace lives, and return the namespace symbol — reloading is the caller's, in whatever way the project reloads. With `staged` alone, the file replaces the one its namespace was loaded from, found on the classpath. Throws when that is not a file on disk — a namespace living in a jar, or one this JVM has no source for — and leaves the staged file where it was. A namespace new to the JVM has no file to replace: name `root`, the source directory it belongs under, as the JVM sees it — relative paths resolve against its working directory.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |