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

Pulls in ClojureScript dependency when you don't need it (say, uberjar). #94

Closed
zentrope opened this issue Jan 11, 2015 · 2 comments
Closed

Comments

@zentrope
Copy link

I have a simple server which uses sente:

{:dependencies [[com.taoensso/sente "1.3.0-RC1"]]}

When I do "lein with-profile production deps :tree" I see:

[com.taoensso/sente "1.3.0-RC1"]
   [com.taoensso/encore "1.18.3"]
   [org.clojure/clojurescript "0.0-2411"]
     [com.google.javascript/closure-compiler "v20140625"]
       [args4j "2.0.26"]
       [com.google.code.findbugs/jsr305 "1.3.9"]
       [com.google.guava/guava "17.0"]
       [com.google.javascript/closure-compiler-externs "v20140625"]
       [com.google.protobuf/protobuf-java "2.5.0"]
       [org.json/json "20090211"]
     [org.clojure/data.json "0.2.3"]
     [org.clojure/google-closure-library "0.0-20140718-946a7d39"]
       [org.clojure/google-closure-library-third-party "0.0-20140718-946a7d39"]
     [org.mozilla/rhino "1.7R4"]
   [org.clojure/tools.reader "0.8.13"]

When I run lein uberjar the resulting artifact (to produce a runnable server app, not a lib), I get the ClojureScript compiler and so on in the resulting jar.

jar tf target/app-standalone.jar | grep "cljs"

reveals the inclusions. The jar is about 22MB in size.

When I add the following:

[com.taoensso/sente "1.3.0-RC1" :exclusions [org.clojure/clojurescript]]

All the ClojureScript stuff is gone, and the resulting jar is about 9.6MB and everything works great. Sente isn't expecting to compile ClojureScript on the fly, right? The exclusion doesn't break anything on another project which IS ClojureScript, either.

I'm not really sure how these things work with libraries, but shouldn't ClojureScript be a provided dependency (if that's the right term)? It's only there to compile the lib, right? The actual jar pulled down from the repo already contains cljs files.

@ptaoussanis
Copy link
Member

Hi Keith, thanks for letting me know about this - just pushed [com.taoensso/sente "1.3.0-RC2"] to Clojars which should hopefully resolve the issue?

Cheers! :-)

@zentrope
Copy link
Author

Looks fixed to me! ;) Thanks.

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

2 participants