Hi all, I sometimes need to (re)load a library, removing public symbols from previously loaded version of the same lib:
(defmacro ns-reload! [ns] `(do (if (find-ns '~ns) (doseq [s# (keys (ns-publics '~ns))] (ns-unmap '~ns s#))) (require :reload-all '~ns))) Use case: Writing tests with Fact [1]. Tests are named with gensyms, and I want to reload a set of tests without continuing to run outdated versions of the tests. Does this already exist? It not, is it useful enough to deserve a home somewhere? Cheers, Stuart [1] http://groups.google.com/group/clojure/browse_thread/thread/193023afbf87698d --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---