Cider Refresh And Undefining Vars
A neat trick I learned a few months back is that you can reset all of your Clojure namespaces in the repl you're working on if you're using Emacs + Cider. Just use M-x cider-refresh.
That command 'refreshes' your repl by undefining the vars and reloading them.
This way, if you have run-away code in your repl state, you can refresh it without doing a cider-restart.
This comes in handy especially when you're writing tests with clojure.test. Let's say you have a few tests written and delete one. If you evaluate the namespace again, the test you deleted is still defined and will run every time you run the tests in that namespace.
So you have two options. Refresh the namespace or, alternatively, cider-undef the var.
Master GitHub Actions with a Senior Infrastructure Engineer
As a senior staff infrastructure engineer, I share exclusive, behind-the-scenes insights that you won't find anywhere else. Get the strategies and techniques I've used to save companies $500k in CI costs and transform teams with GitOps best practices—delivered straight to your inbox.
Not sure yet? Check out the archive.
Unsubscribe at any time.