day8 / re-com

A ClojureScript library of reusable components for Reagent
https://re-com.day8.com.au
MIT License
798 stars 147 forks source link

fix missing core.async dependency error #110

Closed dviramontes closed 7 years ago

dviramontes commented 7 years ago

Seeing this error when I include re-com 0.9.0 into my other project and try to build for prod with:

lein clean && lein cljsbuild once min

Caused by: clojure.lang.ExceptionInfo: No such namespace: cljs.core.async, could not locate cljs/core/async.cljs, cljs/core/async.cljc, or Closure namespace "cljs.core.async" in file /home/travis/build/dviramontes/cfd-fn-talk/target/cljsbuild-compiler-1/re_com/typeahead.cljs {:tag :cljs/analysis-error}

You can see the full stack trace here: https://travis-ci.org/dviramontes/cfd-fn-talk/builds/160884593

This fixed it for me but perhaps there is another way to solve it?

Thanks!

danielcompton commented 7 years ago

The reason why this wasn't caught earlier is that figwheel includes core.async as a dependency, so this wasn't showing up as a build error. I've added some build tests which should alert us to these kinds of things in the future.

The next question is "should we include a core.async dependency, or should the user provide it?". I'm not 100% sure that should be included, it feels a little heavy to add a dep like that. OTOH, if it's needed, then it's needed. Will defer to @Gregg8.

danielcompton commented 7 years ago

Thanks!

Gregg8 commented 7 years ago

Given that re-com now includes typeahead which has a dependency on core.async, it makes sense to have it in project.clj. Thanks.