figwheel

general discussion about figwheel, specific discussions in #figwheel-main and #lein-figwheel
tim 2018-12-23T21:25:48.000600Z

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?

tim 2018-12-23T21:38:46.001900Z

and maybe a way to call functions without qualifying them (which doesn’t work for me)

2018-12-23T21:49:14.003800Z

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.

2018-12-23T21:50:36.005100Z

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?

tim 2018-12-23T21:52:07.006600Z

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.

tim 2018-12-23T21:54:07.008300Z

yeah, I’ve purged all files and have run lein-cljsbuild again… is that what you mean?

tim 2018-12-23T22:00:38.012300Z

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.