cljs.closure/build fails unless *analyze-deps* is false

95 views
Skip to first unread message

John Chijioke

unread,
May 13, 2015, 9:50:39 AM5/13/15
to clojur...@googlegroups.com
cljs.closure/build is failing unless I turn off *analyze-deps*. Is this a normal behavior?

John Chijioke

unread,
May 13, 2015, 10:00:45 AM5/13/15
to clojur...@googlegroups.com
On Wednesday, May 13, 2015 at 2:50:39 PM UTC+1, John Chijioke wrote:
> cljs.closure/build is failing unless I turn off *analyze-deps*. Is this a normal behavior?

Given a source-dir with options like {:optimizations :none :libs [generated-js] :output-to "bar.deps"} it fails when it tries to parse the ns-form of foo.cljs in example/bar with an exception like :

Referred var cljs.core.async/<! does not exist at line 1
example/src/cljs/example/bar/foo.cljs
{:file "example/src/cljs/example/bar/foo.cljs",
:line 1,
:column 1,
:tag :cljs/analysis-error}

core.clj: 4591 clojure.core/ex-info
analyzer.cljc: 384 cljs.analyzer$error/invoke
analyzer.cljc: 382 cljs.analyzer$error/invoke
analyzer.cljc: 1303 cljs.analyzer$check_uses/invoke
analyzer.cljc: 1551 cljs.analyzer$eval32315$fn__32317/invoke
MultiFn.java: 251 clojure.lang.MultiFn/invoke
analyzer.cljc: 1904 cljs.analyzer$analyze_seq/invoke
analyzer.cljc: 1996 cljs.analyzer$analyze$fn__32565/invoke
analyzer.cljc: 1989 cljs.analyzer$analyze/invoke
compiler.cljc: 1027 cljs.compiler$compile_file_STAR_$fn__4370/invoke
compiler.cljc: 968 cljs.compiler$with_core_cljs/invoke
compiler.cljc: 988 cljs.compiler$compile_file_STAR_/invoke
compiler.cljc: 1129 cljs.compiler$compile_file$fn__4402/invoke
compiler.cljc: 1109 cljs.compiler$compile_file/invoke
compiler.cljc: 1181 cljs.compiler$compile_root/invoke
closure.clj: 384 cljs.closure/compile-dir
closure.clj: 424 cljs.closure/eval4810/fn
closure.clj: 331 cljs.closure/eval4763/fn/G
closure.clj: 438 cljs.closure/eval4823/fn
closure.clj: 331 cljs.closure/eval4763/fn/G
closure.clj: 1474 cljs.closure/build
closure.clj: 1429 cljs.closure/build
build.clj: 52 bizlogic.tools.build/build-app/fn
build.clj: 51 bizlogic.tools.build/build-app
build.clj: 72 bizlogic.tools.build/build-once
RestFn.java: 442 clojure.lang.RestFn/invoke
dev.clj: 372 dev/start-app-build
RestFn.java: 442 clojure.lang.RestFn/invoke
dev.clj: 397 dev/start-project-build
RestFn.java: 423 clojure.lang.RestFn/invoke
dev.clj: 401 dev/start-project-build!
RestFn.java: 423 clojure.lang.RestFn/invoke
dev.clj: 405 dev/start-project
RestFn.java: 423 clojure.lang.RestFn/invoke
c22182d5a52545c70ef27b605764c393191484e0-init.clj: 1 dev/eval49887
Compiler.java: 6792 clojure.lang.Compiler/eval
Compiler.java: 6755 clojure.lang.Compiler/eval
core.clj: 3079 clojure.core/eval
main.clj: 240 clojure.main/repl/read-eval-print/fn
main.clj: 240 clojure.main/repl/read-eval-print
main.clj: 258 clojure.main/repl/fn
main.clj: 258 clojure.main/repl
RestFn.java: 1523 clojure.lang.RestFn/invoke
interruptible_eval.clj: 58 clojure.tools.nrepl.middleware.interruptible-eval/evaluate/fn
AFn.java: 152 clojure.lang.AFn/applyToHelper
AFn.java: 144 clojure.lang.AFn/applyTo
core.clj: 628 clojure.core/apply
core.clj: 1866 clojure.core/with-bindings*
RestFn.java: 425 clojure.lang.RestFn/invoke
interruptible_eval.clj: 56 clojure.tools.nrepl.middleware.interruptible-eval/evaluate
interruptible_eval.clj: 191 clojure.tools.nrepl.middleware.interruptible-eval/interruptible-eval/fn/fn
interruptible_eval.clj: 159 clojure.tools.nrepl.middleware.interruptible-eval/run-next/fn
AFn.java: 22 clojure.lang.AFn/run
ThreadPoolExecutor.java: 1142 java.util.concurrent.ThreadPoolExecutor/runWorker
ThreadPoolExecutor.java: 617 java.util.concurrent.ThreadPoolExecutor$Worker/run
Thread.java: 745 java.lang.Thread/run



where cljs.core.async/<! already exists at generated-js.

David Nolen

unread,
May 13, 2015, 10:06:10 AM5/13/15
to clojur...@googlegroups.com
That's not going to work. You cannot load pre-compiled ClojureScript via :libs in this way.

David


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

John Chijioke

unread,
May 13, 2015, 10:31:36 AM5/13/15
to clojur...@googlegroups.com
So you are saying on any single change to a source file a clean must happen before build can succeed?

David Nolen

unread,
May 13, 2015, 11:03:38 AM5/13/15
to clojur...@googlegroups.com
No, I am not saying that. I'm just saying what you are specifically trying to do is not something the ClojureScript compiler has ever supported.

On Wed, May 13, 2015 at 10:31 AM, John Chijioke <johnb...@gmail.com> wrote:
So you are saying on any single change to a source file a clean must happen before build can succeed?

John Chijioke Umeasiegbu

unread,
May 13, 2015, 2:15:24 PM5/13/15
to David Nolen
Okay. Thanks for clarifying. But I still have a number of questions on my mind.

First there are cljs sources in generated-js copied over by source-on-disk or so. 

Second if the compiler is not okay with generated-js sources then why does it not use the classpath jar sources rather than stopping me on my track that it can't resolve a dependency that exists in either location.
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/gbljKUSj9HA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojurescrip...@googlegroups.com.

David Nolen

unread,
May 13, 2015, 2:38:17 PM5/13/15
to clojur...@googlegroups.com
On Wed, May 13, 2015 at 2:15 PM, John Chijioke Umeasiegbu <johnb...@gmail.com> wrote:
Okay. Thanks for clarifying. But I still have a number of questions on my mind.

First there are cljs sources in generated-js copied over by source-on-disk or so.

ClojureScript sources are copied over to :output-dir so they can be easily resolved by source maps. Resolving to the actual original location just makes web server configuration more painful. You should never include :output-dir as a source location to your build tools whatever they might be.

David
Reply all
Reply to author
Forward
0 new messages