Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Om Next pulling in cljs.analyzer namespace #884

Open
mfikes opened this issue Jul 23, 2017 · 3 comments
Open

Om Next pulling in cljs.analyzer namespace #884

mfikes opened this issue Jul 23, 2017 · 3 comments

Comments

@mfikes
Copy link

mfikes commented Jul 23, 2017

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:

(ns example
  (:require [om.next :as om :refer [defui]]))

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:

Release Uncompressed Zipped
1.0.0-alpha44 420,316 106,921
1.0.0-alpha45 535,344 139,291
@dupuchba
Copy link

it is still needed right ? =>

(:name (ana/resolve-var (dissoc env :locals) name))

@mfikes
Copy link
Author

mfikes commented Aug 30, 2017

@dupuchba The dependency on this namespace was only added inadvertently with 7aa8e81
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.

@alexanderkiel
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants