cljs-dev

dnolen 2025-10-04T02:17:00.845009Z

whew - https://github.com/clojure/clojurescript/commit/f9a6856d91e45377391406fc34a581bc4043615e - that took a very, very long time to do.

👏 1
🔥 7
🎉 19
Roman Liutikov 2025-10-06T09:16:33.126959Z

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'

dnolen 2025-10-06T12:29:51.405599Z

there's likely to be a lot of issues like that even w/ all the existing test - that's a good new test case

👍 1
dnolen 2025-10-06T13:52:41.637879Z

written down to open a JIRA issue later, thanks! more feedback like this much appreciated

borkdude 2025-10-07T09:21:27.468339Z

We did some testing with reagent and somehow the bundle size didn’t go down https://github.com/reagent-project/reagent/pull/642

dnolen 2025-10-07T11:25:45.187899Z

@borkdude it's unlikely to work w/ existing libraries - other than probably won't break anything

dnolen 2025-10-07T11:26:22.178579Z

that's not really a goal to apply to it existing libs and expecting the size go down

dnolen 2025-10-07T11:26:39.115239Z

it could work of course, but that's going to require effort on the part of the library writers

dnolen 2025-10-07T11:28:46.626629Z

Really anything involving reagent or any React wrapper isn't really a "lite" thing by definition

juhoteperi 2025-10-08T06:59:21.205939Z

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.

Chris McCormick 2025-10-11T13:38:23.546599Z

This is so cool!

dnolen 2025-10-08T11:23:06.073979Z

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.

dnolen 2025-10-08T11:24:14.310979Z

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.

dnolen 2025-10-08T11:25:57.793039Z

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.

dnolen 2025-10-08T15:20:41.401079Z

(also - protocols are not generally a problem for DCE)

dnolen 2025-10-08T15:21:27.625309Z

perhaps not clear, but the reason :lite-mode works is because of DCE