A tools.namespace dependency tracker can get into an inconsistent state after attempting to load a file with a namespace declaration that does not match the file's name.
Steps to reproduce:
In a new Clojure project, create a file foo.clj on the classpath containing the namespace declaration (ns wrong-ns-declaration-for-foo)
Then at the REPL:
Edit the file foo.clj so that its namespace declaration is correct: (ns foo)
But at the REPL, refresh still doesn't work:
Since tools.namespace 0.2.5, the workaround is to call clear: