Circular ns dependency leads to wrong error
Running figwheel, I accidentally created a circular namespace dependency between two of my files.
Rather than the usual, somewhat friendly, error that I expected from Clojure, I triggered a stack overflow in Figwheel, mostly in figwheel.client.file-reloading/build-topo-sort.
Of course, Figwheel is well within its rights to barf at the invalid input I gave it, but it would be more beginner-friendly to catch this situation.
I just had a similar case. I was adding a new dependency and added some code, while creating a circular dependency. Then I got a stacktrace that looked recursive and at the end was a message that it could not find net.cgrand.regex.clj on the classpath.
It left me very confused and I spent some time until I took my changes back, found this issue and figured out the CD was the problem.
Also, If I remove the code and the dependency and only leave the require statements in the code that lead to the CD I get the expected error message.
Possibly related? I was having trouble with figwheel + cider + luminus, because source dirs were nested and the cljs directory wasn't included as a source dir. @deg @sveri maybe see if that's the case in your projects, and if so, if adding the cljs dir fixes it?
https://github.com/luminus-framework/luminus-template/issues/356
@eggsyntax My cljs directory was contained as a source dir, so that was not the problem.