Fork me on GitHub
#cljs-dev
<
2015-12-06
>
mfikes16:12:42

I'm investigating the cacheability of macro namespaces when using the cache facilities provided by cljs.js.

bensu17:12:37

@mfikes: I'm investigating how should cljs files be recompiled if the macro files that produced them where changed. I guess it's macro Sunday simple_smile

mfikes17:12:56

@bensu: That's cool. Sounds like a dependency tree would be part of the solution. Hmm. What if one clj file depends on another…

bensu17:12:50

@mfikes: yes, that is the hairy part! I'll start handling the first order case, and then see how much effort is needed to build a clojure dep graph on the side.

mfikes17:12:12

@bensu: I'll keep an eye on your stuff and see if it is applicable to bootstrap as well (perhaps with mild relaxation on how it works?)

bensu20:12:53

@dnolen: I could use some guidance on cljs.analyzer/ns-side-effects simple_smile

bensu20:12:25

@dnolen: if a cljs file should be recompiled because one of its required macros changed, the macro file should also be loaded

bensu20:12:44

which is done inside ns-side-effects.

bensu20:12:42

so, if I have a new fn that returns macros-changed? => true, then I should load the macros and recompile the file.

bensu20:12:29

the problem is that it seems that macros-changed? should be added as a condition inside cljs.compiler/requires-compilation? but the side-effects should be called outside.

dnolen20:12:13

Don't think so, just modify Clojure loaded libs before calling build via dynamic binding

dnolen20:12:46

Examine how require actually works in Clojure

dnolen20:12:57

The require fn

bensu20:12:20

ok thanks! what is the dynamic var I should look at?

bensu20:12:19

ohh it's a clojure var, nevermind!