Fork me on GitHub
#cljs-dev
<
2019-01-09
>
mfikes13:01:11

Nice: It appears that https://dev.clojure.org/jira/browse/CLJS-3034 would give some (or most?) of the benefit of https://dev.clojure.org/jira/browse/CLJS-2869 (in particular, in the important case of clj-nil handling), with much less complexity.

kommen15:01:48

if one would want to get some analysis on which namespaces contribute most the the generated js size, like shadow-cljs’ build report (https://code.thheller.com/demos/build-report/huge.html), where would be a good place retrieve the info from the compiler?

thheller15:01:07

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

kommen15:01:25

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

thheller15:01:31

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

thheller15:01:57

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

kommen15:01:35

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

kommen15:01:32

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

thheller15:01:41

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

dpsutton17:01:05

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

dpsutton17:01:31

that commit message is comparison and sorting. Refs #68 but https://dev.clojure.org/jira/browse/CLJS-68 is entitled " IEquiv implementation for regular expressions."

dpsutton17:01:43

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