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
If the namespace has a reserved JS keyword in its name, cljs.compiler will make figwheel look for the wrong path #120
Comments
This change circumvents the bug in figwheel due to which it won't reload files that are in a namespace that has `interface` in its name. bhauman/lein-figwheel#120
After digging into the source code and turning on the debug mode, I think I found the culprit: MDN docs state that
One possible solution that popped into my head: let's pass an empty set to |
interface
in its name, figwheel looks for the folder interface$
instead of interface
Looks like the commit 212a881 introduces |
I investigated this issue further and passing an empty set to
By following these logs I managed to find out that Turns out that I put a debugger in the overwritten So it got me thinking – I can't be the first to have this problem. Quick googling reveled that David Nolen reported this issue back in January 2014 and added the warning in clojure/clojurescript@b0b135b0 22 days ago. I think unless something changes in ClojureScript, people should be discouraged from using reserved JS keywords in namespaces, so this kinda solves my issue, but I'm leaving it open in case @bhauman wants to add anything. |
Thanks for looking into this. Yeah using reserved keywords in namespaces is a bad idea right now, and maybe a bad idea in general. :) |
0.2.5-SNAPSHOT
1.6.0
0.0-3058
41.0.2272.104 (64-bit)
/ Mozilla Firefox36.0.4
10.10.2
A repo with an example that illustrates the problem.
Steps to reproduce the problem:
lein figwheel
.src/figwheel_namespace_bug/interface/handlers.cljs
and trigger a file reload (just saving the file should do the job).As you can see, instead of trying to look in the
interface
folder, it tries to fetch theinterface$
folder.Current solution: just rename the namespace to
ui
. ;)The text was updated successfully, but these errors were encountered: