ClojureScript

Unexpected variable con3$cljs$demo$geometry

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Declined
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    3.11.0-13-generic #20-Ubuntu SMP Wed Oct 23 07:38:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Description

I was playing with three.js and obtained the error below. A snapshot of my project & env is here: https://github.com/Bost/con3-cljs/commit/ebc6e2fc49935f57b4ee642bb345824d76c6b2ec

Compiling "resources/public/js/main.js" from ["src-cljs"]...
WARNING: Use of undeclared Var con3.cljs.demo/geometry at line 53 src-cljs/demo.cljs
Compiling "resources/public/js/main.js" failed.
java.lang.RuntimeException: java.lang.RuntimeException: INTERNAL COMPILER ERROR.
Please report this problem.
Unexpected variable con3$cljs$demo$geometry
Node(NAME con3$cljs$demo$geometry): /home/bost/dev/con3/target/cljsbuild-compiler-2/con3/cljs/demo.js:32:7
return con3.cljs.demo.geometry;
Parent(NEW): /home/bost/dev/con3/target/cljsbuild-compiler-2/con3/cljs/demo.js:35:23
con3.cljs.demo.mesh = (new THREE.Mesh(con3.cljs.demo.geometry,con3.cljs.demo.material));

Compiler.java:715 com.google.javascript.jscomp.Compiler.runInCompilerThread
Compiler.java:647 com.google.javascript.jscomp.Compiler.compile
Compiler.java:603 com.google.javascript.jscomp.Compiler.compile
(Unknown Source) sun.reflect.GeneratedMethodAccessor16.invoke
DelegatingMethodAccessorImpl.java:43 sun.reflect.DelegatingMethodAccessorImpl.invoke
Method.java:606 java.lang.reflect.Method.invoke
Reflector.java:93 clojure.lang.Reflector.invokeMatchingMethod
Reflector.java:28 clojure.lang.Reflector.invokeInstanceMethod
closure.clj:718 cljs.closure/optimize
RestFn.java:139 clojure.lang.RestFn.applyTo
core.clj:619 clojure.core/apply
closure.clj:1030 cljs.closure/build
closure.clj:981 cljs.closure/build
compiler.clj:58 cljsbuild.compiler/compile-cljs[fn]
compiler.clj:57 cljsbuild.compiler/compile-cljs
compiler.clj:158 cljsbuild.compiler/run-compiler
form-init7759117007336734092.clj:1 user/eval2998[fn]
form-init7759117007336734092.clj:1 user/eval2998[fn]
LazySeq.java:42 clojure.lang.LazySeq.sval
LazySeq.java:60 clojure.lang.LazySeq.seq
Cons.java:39 clojure.lang.Cons.next
RT.java:598 clojure.lang.RT.next
core.clj:64 clojure.core/next
core.clj:2781 clojure.core/dorun
core.clj:2796 clojure.core/doall
form-init7759117007336734092.clj:1 user/eval2998
Compiler.java:6619 clojure.lang.Compiler.eval
Compiler.java:6609 clojure.lang.Compiler.eval
Compiler.java:7064 clojure.lang.Compiler.load
Compiler.java:7020 clojure.lang.Compiler.loadFile
main.clj:294 clojure.main/load-script
main.clj:299 clojure.main/init-opt
main.clj:327 clojure.main/initialize
main.clj:362 clojure.main/null-opt
main.clj:440 clojure.main/main
RestFn.java:421 clojure.lang.RestFn.invoke
Var.java:419 clojure.lang.Var.invoke
AFn.java:163 clojure.lang.AFn.applyToHelper
Var.java:532 clojure.lang.Var.applyTo
main.java:37 clojure.main.main
Caused by: java.lang.RuntimeException: INTERNAL COMPILER ERROR.
Please report this problem.
Unexpected variable con3$cljs$demo$geometry
Node(NAME con3$cljs$demo$geometry): /home/bost/dev/con3/target/cljsbuild-compiler-2/con3/cljs/demo.js:32:7
return con3.cljs.demo.geometry;
Parent(NEW): /home/bost/dev/con3/target/cljsbuild-compiler-2/con3/cljs/demo.js:35:23
con3.cljs.demo.mesh = (new THREE.Mesh(con3.cljs.demo.geometry,con3.cljs.demo.material));

VarCheck.java:159 com.google.javascript.jscomp.VarCheck.visit
NodeTraversal.java:540 com.google.javascript.jscomp.NodeTraversal.traverseBranch
NodeTraversal.java:534 com.google.javascript.jscomp.NodeTraversal.traverseBranch
NodeTraversal.java:534 com.google.javascript.jscomp.NodeTraversal.traverseBranch
NodeTraversal.java:534 com.google.javascript.jscomp.NodeTraversal.traverseBranch
NodeTraversal.java:534 com.google.javascript.jscomp.NodeTraversal.traverseBranch
NodeTraversal.java:534 com.google.javascript.jscomp.NodeTraversal.traverseBranch
NodeTraversal.java:314 com.google.javascript.jscomp.NodeTraversal.traverseRoots
NodeTraversal.java:503 com.google.javascript.jscomp.NodeTraversal.traverseRoots
VarCheck.java:102 com.google.javascript.jscomp.VarCheck.process
PhaseOptimizer.java:293 com.google.javascript.jscomp.PhaseOptimizer$NamedPass.process
PhaseOptimizer.java:237 com.google.javascript.jscomp.PhaseOptimizer.process
Compiler.java:1916 com.google.javascript.jscomp.Compiler.optimize
Compiler.java:749 com.google.javascript.jscomp.Compiler.compileInternal
Compiler.java:83 com.google.javascript.jscomp.Compiler.access$000
Compiler.java:650 com.google.javascript.jscomp.Compiler$2.call
Compiler.java:647 com.google.javascript.jscomp.Compiler$2.call
Compiler.java:677 com.google.javascript.jscomp.Compiler$3.call
FutureTask.java:334 java.util.concurrent.FutureTask$Sync.innerRun
FutureTask.java:166 java.util.concurrent.FutureTask.run
ThreadPoolExecutor.java:1145 java.util.concurrent.ThreadPoolExecutor.runWorker
ThreadPoolExecutor.java:615 java.util.concurrent.ThreadPoolExecutor$Worker.run
Thread.java:724 java.lang.Thread.run
Caused by: java.lang.IllegalStateException: Unexpected variable con3$cljs$demo$geometry

Activity

Hide
David Nolen added a comment -

you have a syntax error starting at line 53, the compiler warning is a clue, geometry is outside the let form.

Show
David Nolen added a comment - you have a syntax error starting at line 53, the compiler warning is a clue, geometry is outside the let form.
David Nolen made changes -
Field Original Value New Value
Resolution Declined [ 2 ]
Status Open [ 1 ] Resolved [ 5 ]
David Nolen made changes -
Status Resolved [ 5 ] Closed [ 6 ]
Hide
Rostislav Svoboda added a comment -

> you have a syntax error starting at line 53, the compiler warning is a clue, geometry is outside the let form.

I didn't open this issue in order to be told how to fix my code.
I opened it because (1) the clojurescript compiler crashed and (2) I was instructed: "Please report this problem."!

Show
Rostislav Svoboda added a comment - > you have a syntax error starting at line 53, the compiler warning is a clue, geometry is outside the let form. I didn't open this issue in order to be told how to fix my code. I opened it because (1) the clojurescript compiler crashed and (2) I was instructed: "Please report this problem."!
Hide
David Nolen added a comment -

Sorry for the confusion and the short response - was at Clojure/conj the past two days.

The "Report this error" is from Google Closure - not ClojureScript.

Show
David Nolen added a comment - Sorry for the confusion and the short response - was at Clojure/conj the past two days. The "Report this error" is from Google Closure - not ClojureScript.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: