lol - you're right. I added ^:export to my entry point functions and all is 
right with the world.  :-)

I noticed that if I remove the module for com.foo.common, the code in there 
gets included in cljs_base.js in the compiler temporary output, but there is no 
dead code elimination performed there. This may be expected, it just means that 
I need to declare all my code in modules if I want it minified.

Also, about the explicit module dependencies declarations: it seems like it 
should be possible to automatically generate these by analyzing the namespace 
metadata. Is there a reason to force this to be explicitly declared instead?

Thanks, awesome stuff -
Edwin


On Wednesday, February 18, 2015 at 6:42:35 AM UTC-5, Thomas Heller wrote:
> That is probably dead code removal in action. Since none of your code is 
> actually called it all will be removed. :)
> 
> Try to ^:export a function that will keep it from getting removed or just 
> call one of the functions.
> 
> (ns com.foo.editor 
>   (:require [com.foo.common :refer (blah)])) 
> 
> (defn ^:export edit [x] 
>       (str "editing:" (blah x))) 
> 
> 
> On Wednesday, February 18, 2015 at 11:50:19 AM UTC+1, Edwin Park wrote:
> > Ah ok thanks! - I did this and now the module output-to files are 
> > generated, but they are all empty:

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to