I just updated shadow-cljs from 3.4.11 to 3.5.5 and my app broke completely. According to Claude, the first version that would have caused this was 3.4.12. Specifically (quoting Claude here, sorry): - shadow-cljs replaces part of ClojureScript's code generation in shadow/build/cljs_hacks.cljc. In 3.4.12 it copied the CLJS-3024 fix, which changes how a deftype that implements IFn gets its .apply method. The copy dropped one step that upstream ClojureScript keeps: copying the arguments with aclone before .concat. - Rum calls every component through (.apply ctr ctr (js-arguments)), and ctr is a MetaFn, created by with-meta. So .apply receives the JavaScript arguments object. - .concat does not spread an arguments object. It appends it as one element. So every Rum component receives the arguments object as its only argument. - The result is a blank page. React reports error #31, because map entries and keywords end up rendered as children. The logo's <svg width> receives [object Arguments]. This seems to make sense to me, should I file a github issue?
hmm seems like that should be a problem with CLJS itself too then? like without shadow-cljs?
I think this looks like a real bug
Original cljs commit, which I think was copied: https://github.com/clojure/clojurescript/commit/8b3ce24a6e7e1863802b09618985a0f3a604a0c9
Later fix: https://github.com/clojure/clojurescript/commit/7af8c42f6a9c045b4c5e213163a04816935ebe42 Which specifically mentions fn calls / rum components with over 20 args
we are checking (this is for all fellow F1 Ferrari fans out there)
BTW, I feel like @thheller deserves some serious praise for shadow-cljs. More than a year ago, I switched my fairly large and complex app to building with shadow-cljs. This was not a small undertaking, and also along the way I split the app into modules, with dynamic module loading, which I could never get to work before. It would not have been possible without extensive help from Thomas (thanks! π). But more importantly, more than a year has passed, and now is the first time I have encountered a problem with shadow-cljs. Things just work reliably. There are no unexplained hangs, issues, or mysterious problems. This is very, very impressive. Especially for such a problematic and messy area as build systems. shadow-cljs is one of the best pieces of software I have ever seen. Thank you, Thomas, for creating it and maintaining it to such a high standard.
thanks so much. glad it works for not just me π
Seconded. The only reservation I have about sponsoring Thomas on GitHub is that I haven't done it sooner!