Re: [ClojureScript] Little trouble with cljsc (from clojurescriot repo cloned yesterday), thoughts?

202 views
Skip to first unread message

David Nolen

unread,
Mar 12, 2014, 3:06:42 PM3/12/14
to clojur...@googlegroups.com
Did you run the bootstrap script?

David


On Wed, Mar 12, 2014 at 3:02 PM, Alan Shaw <node...@gmail.com> wrote:
natoma:cljs alan$ cat >hello.js
(ns hello)
(defn ^:export greet [n]
  (str "Hello " n))
natoma:cljs alan$ which cljsc
/Users/alan/Workspaces/Clojure/clojurescript/bin/cljsc
natoma:cljs alan$ cljsc hello.cljs '{:optimizations :advanced}' > hello.js
Exception in thread "main" java.lang.ClassNotFoundException: com.google.javascript.jscomp.JSSourceFile
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at clojure.lang.DynamicClassLoader.findClass(DynamicClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at cljs.closure$eval5$loading__4910__auto____6.invoke(closure.clj:9)
at cljs.closure$eval5.invoke(closure.clj:9)
at clojure.lang.Compiler.eval(Compiler.java:6619)
at clojure.lang.Compiler.eval(Compiler.java:6608)
at clojure.lang.Compiler.load(Compiler.java:7064)
at clojure.lang.RT.loadResourceScript(RT.java:370)
at clojure.lang.RT.loadResourceScript(RT.java:361)
at clojure.lang.RT.load(RT.java:440)
at clojure.lang.RT.load(RT.java:411)
at clojure.core$load$fn__5018.invoke(core.clj:5530)
at clojure.core$load.doInvoke(core.clj:5529)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5336)
at clojure.core$load_lib$fn__4967.invoke(core.clj:5375)
at clojure.core$load_lib.doInvoke(core.clj:5374)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:619)
at clojure.core$load_libs.doInvoke(core.clj:5413)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:619)
at clojure.core$require.doInvoke(core.clj:5496)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at user$eval1.invoke(cljsc.clj:9)
at clojure.lang.Compiler.eval(Compiler.java:6619)
at clojure.lang.Compiler.load(Compiler.java:7064)
at clojure.lang.Compiler.loadFile(Compiler.java:7020)
at clojure.main$load_script.invoke(main.clj:294)
at clojure.main$script_opt.invoke(main.clj:356)
at clojure.main$main.doInvoke(main.clj:440)
at clojure.lang.RestFn.invoke(RestFn.java:436)
at clojure.lang.Var.invoke(Var.java:423)
at clojure.lang.AFn.applyToHelper(AFn.java:167)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.main.main(main.java:37)
natoma:cljs alan$ 

--
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.

Alan Shaw

unread,
Mar 12, 2014, 3:14:40 PM3/12/14
to clojur...@googlegroups.com
Yes, I did run the bootstrap script.



(btw s/cat >hello.js/cat >hello.cljs/

Alan Shaw

unread,
Mar 12, 2014, 10:08:16 PM3/12/14
to clojur...@googlegroups.com

So it appears that either bootstrap or cljsc is broken.

David Nolen

unread,
Mar 13, 2014, 8:24:25 AM3/13/14
to clojur...@googlegroups.com
I can't recreate your issue on master with two important corrections, cat > hello.cljs, hello.cljs declares a non-single segment namespace hello.core.

Neither bootstrap nor cljsc appear broken to me.

David

Ian Young

unread,
Mar 13, 2014, 3:25:20 PM3/13/14
to clojur...@googlegroups.com
I'm having the same issue. It happens even if I just run ./script/repljs with no args (notably, ./script/repl works fine). I did run the bootstrap and it didn't complain.

Ubuntu 13.10 if that helps. Java 1.7.0_51.

Alan Shaw

unread,
Mar 14, 2014, 12:48:47 AM3/14/14
to clojur...@googlegroups.com
I have done git pull in my clojurescript folder and then bootstrap and nothing has changed after making the cljs namespace hello.core.. I am also having the same exception when just running ./script/repljs, as Ian has.

Someone else has had a similar issue recently:

(cat >hello.js was just a typo in my original posting.)

-A

David Nolen

unread,
Mar 14, 2014, 9:09:20 AM3/14/14
to clojur...@googlegroups.com
I cannot replicate from a fresh checkout. Will need some other people to chime in.

David

Eduard Bondarenko

unread,
Mar 14, 2014, 9:18:08 AM3/14/14
to clojur...@googlegroups.com
I have the same issue, https://www.refheap.com/58358


Best regards,
Eduard

David Nolen

unread,
Mar 14, 2014, 9:19:53 AM3/14/14
to clojur...@googlegroups.com
I would like to see steps only from a fresh checkout. Thanks.

David

Eduard Bondarenko

unread,
Mar 14, 2014, 9:36:29 AM3/14/14
to clojur...@googlegroups.com
I think the problem is JSSourceFile class was removed from compiler.jar

Best regards,
Eduard

Eduard Bondarenko

unread,
Mar 14, 2014, 9:41:20 AM3/14/14
to clojur...@googlegroups.com
* @deprecated JSSourceFile is an empty wrapper around SourceFile. Just
37- * use SourceFile directly.
38- */
39-// TODO(nicksantos): Delete this file.

:-)

Best regards,
Eduard

David Nolen

unread,
Mar 14, 2014, 9:47:22 AM3/14/14
to clojur...@googlegroups.com
Thanks for looking into this, fixed in master http://github.com/clojure/clojurescript/commit/a4f7a89a887c483722f6ec6d75e0e7c76c7d92b2.

Does the issue still persist for anyone?

David

Eduard Bondarenko

unread,
Mar 14, 2014, 9:50:30 AM3/14/14
to clojur...@googlegroups.com
Thank you, David. Works perfect now. (inc dnolen)
Best regards,
Eduard

Alan Shaw

unread,
Mar 14, 2014, 10:04:34 PM3/14/14
to clojur...@googlegroups.com
All good here, thanks!
Reply all
Reply to author
Forward
0 new messages