Ok, I've gotten a bit further and have the following question:

1) Thomas, I was able to get the compile to complete using my original
refheap, which incidentally follows the chestnut template so I think
the structure of those options is ok.

2) I don't understand why there are still individual js files for each
of my namespaces put into the out/ dir. Isn't the idea of an advanced
compile to combine everything into a single file? Or is it that I can
remove those files in the out/ dir after compile completes, that those
are just intermediate necessities while it completes the main js file?

3) Why is the profile name specified twice in the command you noted:

lein with-profile prod cljsbuild once prod

4) I got around the circular dependency by just removing the problem
namespace for now. But I don't understand why the compiler would
report a circular dependency in the first place. First of all, the app
works fine with no warning with optimizations are :none. Second, this
namespace :requires 3 other of my namespaces, plus core.async. None of
those other namespaces are :requiring this problem namespace reported
in the circular dependency. Isn't a circular dependency when File A
requires File B, and vice versa? If so, that is not happening here.
Now, both files can require File C, that's fine, right?

On Fri, Jan 30, 2015 at 11:34 AM, Hello Funk
<hellof...@floatingmachine.com> wrote:
> Thanks Thomas. I tried your version of the project.clj. Should the
> output directory be the same in both dev and prod? Because when I set
> them the same, I get this when trying the prod build:
>
> Error encountered performing task 'cljsbuild' with profile(s): 'prod'
> java.lang.Exception: All [:compiler :output-dir] options must be distinct.
>
> On Fri, Jan 30, 2015 at 10:21 AM, Thomas Heller <th.hel...@gmail.com> wrote:
>> 1) The main js file is empty because of the closure compiler error. The 
>> circular dependency is somewhere in your code, usually :none should detect 
>> it as well but difficult to tell without the source.
>>
>> 2) I do not think the cljsbuild config should be in a profile.
>>
>> https://www.refheap.com/96682
>>
>> Try defining a :dev and :prod build and then run
>>
>> lein with-profile prod cljsbuild once prod
>>
>> or in dev
>>
>> lein cljsbuild auto dev
>>
>>
>> HTH,
>> /thomas
>>
>>
>> On Friday, January 30, 2015 at 9:30:41 AM UTC+1, Andrew S wrote:
>>> I need another set of eyes on this to see what I'm doing wrong. This is my 
>>> project.clj:
>>>
>>> https://www.refheap.com/96680
>>>
>>> At the command line, I do this:
>>>
>>> lein with-profile prod cljsbuild once
>>>
>>> It does a number of things that are apparently not right:
>>>
>>> 1) It spits out the main js file that only has this in it:
>>>
>>> ;(function(){
>>>
>>> })();
>>>
>>> 2) It still generates an out/ dir with separate js files for each cljs 
>>> namespace.
>>>
>>> 3) The compiler gives me a circular dependency error when there is none in 
>>> my code, and the :none optimizations work fine. The error says this:
>>>
>>> Jan 30, 2015 9:24:51 AM com.google.javascript.jscomp.LoggerErrorManager 
>>> println
>>> SEVERE: ERROR - Circular dependency detected: appjs.session -> appjs.session
>>>
>>> Jan 30, 2015 9:24:51 AM com.google.javascript.jscomp.LoggerErrorManager 
>>> printSummary
>>> WARNING: 1 error(s), 0 warning(s)
>>> ERROR: JSC_CIRCULAR_DEP. Circular dependency detected: appjs.session -> 
>>> appjs.session at (unknown source) line (unknown line) : (unknown column)
>>>
>>> I'm sure I'm doing something obvious, if anyone can tell what it is, let me 
>>> know. Leiningen is a bit of a mystery to me.
>>>
>>> Andrew
>>>
>>> --
>>> hellofunk
>>
>> --
>> Note that posts from new members are moderated - please be patient with your 
>> first post.
>> ---
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "ClojureScript" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/clojurescript/Boc3w0BbNCw/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> clojurescript+unsubscr...@googlegroups.com.
>> To post to this group, send email to clojurescript@googlegroups.com.
>> Visit this group at http://groups.google.com/group/clojurescript.
>
>
>
> --
> hellofunk



-- 
hellofunk

-- 
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 clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to