figwheel-main

figwheel-main http://figwheel.org
grumplet 2020-08-19T07:01:37.286200Z

OK, so the main issues I had with figwheel-main + deps + webpack + test combination working were all minor configuration issues. They were however difficult and time consuming to overcome because of the frequent need to clear the .cpcache and or the target directory in order to regain sane results. I’m not sure why that was. It’s also hard to keep VSCode/Calva in-line evaluation in a working state. That’s the job for today. Conclusion to date is that shadow-cljs was much easier to set up though the cljs-core/deps route felt lower-level and so more understandable.

grumplet 2020-08-19T07:07:01.287500Z

One insight gained in the process was that --print-config is very useful when chasing :output-to and :final-output-to issues.

grumplet 2020-08-19T07:07:14.287800Z

clojure -m figwheel.main -pc -b dev -r

grumplet 2020-08-19T07:07:22.288Z

and the like.

grumplet 2020-08-19T08:26:26.291700Z

Another note: I was using cljs-ajax and hit the issue fixed by @bhauman in https://github.com/JulianBirch/cljs-ajax/pull/248. In the nick of time, that was recently merged into cljs-ajax 0.8.1 - so you definitely need to update to that version if you use it (e.g. through reframe)

reefersleep 2020-08-19T09:05:21.291900Z

Sounds like the right choice. I find that usually, util namespaces are not that difficult to break up into smaller namespaces, so performing the refactoring itself is not that costly or error fraught; however, if the depending ns’es end up requiring most of the util ns’es anyway, the performance gain might not even be palpable.

grumplet 2020-08-19T10:26:04.298600Z

Once you have a working webpack build you can then reconnect with Calva jack-in selecting ONLY ‘fig’ initially. Wait for the build to complete, and THEN select the build - ‘dev’ or ‘test’. This should load a working build using the Calva repl rather than the figwheel rebl-readline and allow you to use inline evaluation in the editor.

2020-08-19T15:45:43.299200Z

@grumplet So you did manage to get a test setup working then?

dominicm 2020-08-19T19:26:42.299700Z

@grumplet knowing what config you changed would be useful!