Fork me on GitHub

Nice: It appears that would give some (or most?) of the benefit of (in particular, in the important case of clj-nil handling), with much less complexity.


if one would want to get some analysis on which namespaces contribute most the the generated js size, like shadow-cljs’ build report (, where would be a good place retrieve the info from the compiler?


@kommen the info about size is extracted from the source maps


ok, that means i’m already out of luck for any cljsjs stuff we’re including, right?


yep, well for cljsjs you only really need to look up which one got included and look at the filesize of that


since it won't map to a billion files like some npm packages


I’m using source-map-explorer now on a optimizations :simple build, but it seems it doesn’t attribute everything correctly, especially defs defining bigger data structures are not attributed to the ns they are defined in


so I was wondering if there is some step in the compiler where I could log information on the js size of a namespace


only place I found was the source maps. closure compiler only exposes general stuff but not very fine grained otherwise


Clojure's sort-by and sort both promise to be stable. The cljs versions of this were written in 2011 and include a comment that

;; matching Clojure's stable sort, though docs don't promise it
       (garray/stableSort a (fn->comparator comp))
but the docstring has not been updated to promise this for 8 years now. Would there be interest in committing to this behavior or is this still something that cljs wants to be able to change in the future?

Alex Miller (Clojure team)17:01:42

fwiw, I think it would be ok to commit to it (as Clojure did), presuming it’s true, which from the look of the call to “stableSort”, it is


that commit message is comparison and sorting. Refs #68 but is entitled " IEquiv implementation for regular expressions."


I created a ticket but was unable to choose 1.10.439 as an affected version. The highest version currently in this list is 1.10.238