-
Notifications
You must be signed in to change notification settings - Fork 69
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
no ns form found #133
Comments
@benedekfazekas I'm not sure what to do about this. If there's a bug here, it's in tools.namespace. tools.namespace attempts to read an ns form and returns I've never never seen this myself and without being able to reproduce it it's going to be real hard to fix. |
Christmas is coming. No promises but I'll try to find some time and debug this issue. |
@whysoserious some more info, something reproducible would be nice. @expez no worries. just wanted to record this so we don't forget to follow up (incl. @whysoserious :) ) |
Found it! File at the top of the stacktrace However, my question is, how should we handle such situation? Imho we should silently ignore faulty |
Frankly, I think this is fine. There's no reason to have faux clj files on the classpath like this, and the error message was also spot on about how to fix the problem. I'm always the one taking the more conservative stance, so @benedekfazekas might disagree with me here. I just think this is such an uncommen edge-case that it isn't worth making changes which might cause us to do the wrong thing when instead we should've aborted. |
I'd make it user-friendly. Empty or commented out |
I'm having the same problem. I suggest two potential fixes:
|
took a stab on this one (ignoring errors when |
Okay, then my stance is with @whysoserious:
|
good. then the time I spent on this is not wasted ;) however no fix yet |
After thinking about it I took a more direct way to fix it: I don't see any harm if we are not overly strict with the projects we work with in terms of the presence of the ns declaration. The worst thing that can happen I guess that we can not really do anything with the empty/no ns macro To prove my point I added an empty clj file to our |
I'm all for this change, since it mirrors how Clojure itself handles
|
snapshot is published on clojars. let me know guys if that fixes your problem. |
Great, thanks! I'll check it out. |
Wohoo, it's working! <3 Thank you. |
greatto! (was not aware you can do reactions on github now...) |
reported by @whysoserious
Hi, I spotted a weird bug while using clj-refactor (I hope that it's a good place to let you know about that)
In some situations when I invoke cljr- command I get errors like this:
Message at the top is a lie
This ns form does exist
I need to restart cider to make it work again
and at some random moment I start getting these errors again
The text was updated successfully, but these errors were encountered: