Open mfikes opened 7 years ago
it is still needed right ? => https://github.com/omcljs/om/blob/c68e668a73cc534ecfdc71d6314abc3af911657e/src/main/om/next.cljc#L403
@dupuchba The dependency on this namespace was only added inadvertently with https://github.com/omcljs/om/commit/7aa8e81ba93899ca3dcd7b924f4e12e903b62b0d The solution is indeed not to simply remove it from the ns form, but to somehow only depend on it when being compiled by the self-hosted compiler.
I have just put everything which needed cljs.analyzer
into #?(:clj
and I save about 91 kB in my real-world project. I don't have experience with self hosting. Also boot gives me errors if I try to run tests. So for now. I can't really do anything, but I would be more than happy to save this 91 kB.
I found this issue because I searched for big parts in my advanced compiled script. cljs.analyzer
is quite on top of my list.
With the enhancement for server-side rendering support, Om Next is inadvertently adding the
cljs.analyzer
namespace as dependency in JVM ClojureScript builds.In concrete terms:
results in
cljs.analyzer
here.In a downstream project, as a result, compiling with
:advanced
increases by 112k unzipped and around 31k zipped. Here are the actual numbers: