First day with Figwheel. Not using figwheel-main, but I am using figwheel+piggback+rebl. Got the cljs-repl up and tried calling fn using a qualified ns i.e (app.main/some-fn). It works, but it’s barfing compiler warnings about it being an undeclared var. Is there a fix to this that does not involve turning warnings off?
and maybe a way to call functions without qualifying them (which doesn’t work for me)
If you situate the REPL in the function's ns, as with (in-ns 'app.main), then you can call (some-fn) like that. But that is just a question of spelling, really. It's probably not related to compiler warnings.
Did you try clearing out the js directory (I mean the place where cljs compiles to) and doing a fresh compile, just to be sure detritus from earlier isn't complicating things?
yeah, being in the ns works for direct calls now, but it’s not just spelling for qualified calls since the call actually gets triggered and I can see the result in the browser.
yeah, I’ve purged all files and have run lein-cljsbuild again… is that what you mean?
thanks phil, got it working… first day glitches. I was calling the function from user.cljs. I’m guessing it’s because that user.cljs doesn’t have access to my ns because they are not included. switched to app.main and then calling other included namespace fns works. what threw me off was that the original fn call from user actually worked, but emitted the warning.