On Dec 16, 4:55 pm, Stuart Sierra <the.stuart.sie...@gmail.com> wrote: > I would find this useful; I've even tried writing it in the past. > Perhaps it could go in clojure.contrib.ns-utils. > > A thought -- would it be more thorough to use "remove-ns"? > > -the other Stuart (Sierra) > > On Dec 16, 4:32 pm, Stuart Halloway <stuart.hallo...@gmail.com> wrote: > > > Hi all, > > > I sometimes need to (re)load a library, removing public symbols from > > previously loaded version of the same lib: > > > (defmacro ns-reload > > `(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/193023afb...
I'm also interested in having this utility. After it works, the next thing I would write is (ns-reload-all!), which reloads everything. Allen --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---