What is the preferred way of reloading functions defined in a Clojure file without having to restart the REPL. Right now, in order to use the updated file I have to:
- edit
src/foo/bar.clj
- close the REPL
- open the REPL
(load-file "src/foo/bar.clj")
(use 'foo.bar)
In addition, (use 'foo.bar :reload-all)
does not result in required effect, which is evaluating the modified bodies of functions and returning new values, instead of behaving as the source haven't changed at all.
Documentation:
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…