Fork me on GitHub
#cljs-dev
<
2015-07-29
>
juhoteperi09:07:41

Is there any contract on what namespace analysis map contains (`:requires`)? Or should there be api calls to access e.g. requires? (defn ns-depedencies [state ns] (vals (:requires (find-ns state ns))))

juhoteperi09:07:05

I've been checking on how to use cljs api for last piece of boot-cljs which accesses compiler env directly: https://gist.github.com/Deraen/19b62045e74e547025de

juhoteperi09:07:50

I could use cljs-ns-dependants but that does lots of unnecessary stuff when I really need only :requires

dnolen11:07:18

@juhoteperi: accessors into the analysis map are a good thing, we’re not going to make promises about what's in there and what shape it’s going to be.

dnolen11:07:12

for perf reasons it probably won’t even be a plain map for much longer - so any expectations that it is will likely break

bensu13:07:17

I've encountered problems using records in cljc. While Clojure needs the (:import [my.new.Class]), ClojureScript only uses :import for goog classes. The only solution I found was:

bensu13:07:01

Any thoughts on how to solve this in a cleaner way?

potetm13:07:44

@bensu: Could you just not have a :cljs clause?

bensu13:07:52

@potetm: I tried that at some point and encountered an error. I'll try to reproduce it.

potetm13:07:15

@bensu: Cool. Also, we might move this to the #C03S1L9DN channel. Don’t want to bother these guys with non-development stuff.

bensu13:07:46

@potetm: right, will do. If it's not me stumbling, I have a feeling though that this issue should be address for the general case, since it will be a head scratcher for every cljc user.