keechma

Keechma stack. Mention @U050986L9 or @U2J1PHYNM if you have any questions
Ahmed Hassan 2019-07-08T11:51:53.255300Z

How do you setup hot code reload with shadow-cljs in Keechma?

Ahmed Hassan 2019-07-08T11:53:51.256Z

I am using shadow-cljs as build tool and code is not being loaded to browser when I save file after changes.

Ahmed Hassan 2019-07-08T11:54:47.257Z

So, I have to press reload button of browser to see results and effects.

Ahmed Hassan 2019-07-08T12:02:28.258700Z

UI behaves same way after changes. (to make it behave in new(changed) way browser reload button is needed to be pressed)

Ahmed Hassan 2019-07-08T12:32:35.261Z

I just noticed that when I make changes and save the core.cljs file in which app-definition/app-config is defined and app is mounted, changes are loaded to the browser automatically. (even ones I did in other namespaces.)

mihaelkonjevic 2019-07-08T12:38:31.261800Z

@ahmed1hsn AFAIK there were some issues with shadow-cljs not reloading transitive dependencies. This is not a keechma related issue, but it works differently than figwheel

mihaelkonjevic 2019-07-08T12:40:39.262300Z

I was using shadow-cljs only for node projects, I’m using classic figwheel for all projects I’m working on

Ahmed Hassan 2019-07-08T12:47:39.262900Z

Is there any possible workaround or should I move to figwheel-main? I'm using shadow-cljs because it's simple and interop with npm libs is painless.

mihaelkonjevic 2019-07-08T13:28:53.264400Z

@ahmed1hsn not sure. I’m not even using figwheel-main, just figwheel (although I did test figwheel and it was working ok). For npm libs I’m using this setup: https://github.com/retro/protok-frontend/blob/master/project.clj https://github.com/retro/protok-frontend/blob/master/src/js/index.js https://github.com/retro/protok-frontend/blob/master/Makefile#L18 We’re using it on all our projects and it works flawlessly

carkh 2019-07-08T15:25:20.264900Z

actually easy to make it work with shadow-cljs

carkh 2019-07-08T15:25:32.265200Z

i personally prefer it to figwheel-main