whew - https://github.com/clojure/clojurescript/commit/f9a6856d91e45377391406fc34a581bc4043615e - that took a very, very long time to do.
an interesting side effect for existing cljs code when switching to lite mode is that clj->js breaks the conversion
(aget (clj->js {:x 1}) "x") -> nil
looks like this happens because obj-map prefixes keys with \uFDD0'
there's likely to be a lot of issues like that even w/ all the existing test - that's a good new test case
written down to open a JIRA issue later, thanks! more feedback like this much appreciated
We did some testing with reagent and somehow the bundle size didn’t go down https://github.com/reagent-project/reagent/pull/642
@borkdude it's unlikely to work w/ existing libraries - other than probably won't break anything
that's not really a goal to apply to it existing libs and expecting the size go down
it could work of course, but that's going to require effort on the part of the library writers
Really anything involving reagent or any React wrapper isn't really a "lite" thing by definition
Is there some specific calls or using something (like extending some protocols) or something that causes the non-lite PersistentVector etc. to be used/kept in the artifact? Just interested in what affects this, not that I'm interested in Reagent supporting this.
This is so cool!
One issue with the standard data structures is that they are intertwined - they all reference each other. So some code (in ClojureScript or the librarry) may either directly reference PersistentVector or reference some other type that does - this requires some sleuthing.
One thing to understand here is that :lite-mode doesn't really prevent using the regular data structures and I don't really believe it should - otherwise a lot of programs won't work.
Thus it mostly focuses on literals - and some simple cases vector -> simple-vector etc. I didn't do everything because the whole idea needs feedback from people who are interested and having fun using ClojureScript in contexts where smaller artifacts are useful.
(also - protocols are not generally a problem for DCE)
perhaps not clear, but the reason :lite-mode works is because of DCE