Skip to content

Commit 1c6d489

Browse files
committed
Add some notes on tools.namespace to the reloading documentation
1 parent 2f3a802 commit 1c6d489

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,26 @@ passed or failed:
472472

473473
### Code reloading
474474

475+
* `cider-refresh` wraps
476+
[clojure.tools.namespace](https://github.com/clojure/tools.namespace), and as
477+
such the same
478+
[benefits](https://github.com/clojure/tools.namespace#reloading-code-motivation)
479+
and
480+
[caveats](https://github.com/clojure/tools.namespace#reloading-code-preparing-your-application)
481+
regarding writing reloadable code also apply.
482+
483+
* Calling `cider-refresh` will cause all modified Clojure files on the classpath
484+
to be reloaded. You can also provide a single prefix argument to reload all
485+
Clojure files on the classpath unconditionally, or a double prefix argument to
486+
first clear the state of the namespace tracker before reloading.
487+
488+
* The above three operations are analogous to
489+
[`clojure.tools.namespace.repl/refresh`](http://clojure.github.io/tools.namespace/#clojure.tools.namespace.repl/refresh),
490+
[`clojure.tools.namespace.repl/refresh-all`](http://clojure.github.io/tools.namespace/#clojure.tools.namespace.repl/refresh-all)
491+
and
492+
[`clojure.tools.namespace.repl/clear`](http://clojure.github.io/tools.namespace/#clojure.tools.namespace.repl/clear)
493+
(followed by a normal refresh), respectively.
494+
475495
* You can define Clojure functions to be called before reloading, and after a
476496
successful reload, when using `cider-refresh`:
477497

0 commit comments

Comments
 (0)