Fork me on GitHub

Hi Guys, I'm trialling cljs for a internal tool at our company. I'm using re-frame & re-posh (datascript, re-frame style). Also using shadow-cljs if that makes a differenc. I have a situation where the app behaves incorrectly when compiled with advanced optimizations. Specifically, I tracked it down to a point where a co-fx handler (`:transact`, part of re-posh) does not run/take effect. Is this usual? Does it happen often that a cljs that "works" in a dev build mode does not work when advanced compilations are switched on? I de-tuned optimizations to simple and it seems to work, but I'm a little nervous about the stack all of a sudden. Some advice, insight, wisdom or opinions would be highly appreciated 🙂


It does happen, and sometimes they are tricky to fix. I had a similar thing using re-graph which was quickly fixed. It helps if you dive a little into the code. I think in the re-graph case it was the use of a key to call a method or something.


it happens @U2G3G2S6S ... usually because advanced compilation is munging some name you want to stay unmunged (because it’s an external dependency). have a read of the shadow manual externs section (12.2) for some things you can do to resolve the issue


wow - thank you guys for responding. I'll take a look and see if I can figure it out :thumbsup:


I’ve seen it happen with mixed libraries (eg js/cljs) not so much with pure cljs