Weekend drop: clj-reload! A replacement for tools.namespace that does a few things differently:
- Can handle namespaces split across multiple files
- Does not try to load files that were not explicitly loaded before
- Can keep vars between reloads (defonce finally works as intended!)
- Lets you specify unload hooks for namespaces
- (arguably) cleaner API
Here’s a blog post with a video demonstration https://tonsky.me/blog/clj-reload/