Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circular ns dependency leads to wrong error #676

Open
deg opened this issue Apr 11, 2018 · 3 comments
Open

Circular ns dependency leads to wrong error #676

deg opened this issue Apr 11, 2018 · 3 comments

Comments

@deg
Copy link

deg commented Apr 11, 2018

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.

@sveri
Copy link

sveri commented Apr 17, 2018

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.

@eggsyntax
Copy link

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?

luminus-framework/luminus-template#356

@sveri
Copy link

sveri commented Apr 18, 2018

@eggsyntax My cljs directory was contained as a source dir, so that was not the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants