caribou/caribou-frontend — pull request #7 by lgrapenthin (2014-01-10 21:19:10+00:00)
Title: Switch from ns-tracker to clojure.tools.namespace

Why?
1. `ns-tracker` has not been updated for a long time. It uses its own dependency graphing strategy and depends on an outdated version of `clojure.tools.namespace`. `clojure.tools.namespace` is an officially supported Clojure library.
2. In Caribou, code reloading is (currently) only used for development purposes. For that `clj.t.ns.repl` provides various features like for example the ability to automatically recover namespaces during reloading or more detailed exception info (which could be interpreted and rendered in Caribous fallback handlers to provide the dev with some hints how to get his controller right or what else the issue would supposedly be).
3. The `clj.t.ns.repl` API has it's own dependency tracker in a private var so it works the same on all threads. It provides well thought out features like `set-refresh-dirs` that enable the dev to alter reloading behavior in runtime or even to trigger a reload on his own without interfering with Caribou.

Hints:
- When developing Caribou core projects such as frontend or core and running them simultaneously in a Webapp via leiningen checkouts you may want to prevent files with global state from being reloaded by invoking `clj.t.ns.repl/disable-reload` directly as a top-level form after the ns-declaration!
- You may also want to `set-refresh-dirs` to "src" to prevent unnecessary code on the classpath being reloaded before the handler is instantiated.
- When doing this notice that files may be reloaded even if they have not been changed the first time `reload` is triggered

Differences from previous reloading behavior: As far as I can see, the difference is that clj files on the entire classpath will be reloaded instead of just clj files in "src". In a newly generated user app that does not seem to create problems, for developing however please refer to the hints above.

Testing I have done:
Run a newly generated Caribou webapp with `[caribou/caribou-admin "0.13.5"]` and `[caribou/caribou-frontend "0.13.5-SNAPSHOT"]` (this PR), create a page, create an action, expect it to be loaded automatically. So far everything seems to work as expected.