Trying to get Cider and nREPL working with ClojureScript is likely to be
more trouble than it's worth. I highly recommend sticking to a simpler
setup -
https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-with-Emacs-Inferior-Clojure-Interaction-Mode

HTH,
David

On Fri, Jul 3, 2015 at 3:38 AM, Evan Moses <[email protected]> wrote:

> I'm using:  Cider 0.9.1, NRepl 0.2.10, piggieback 0.2.1, fighweel 0.3.1,
> weasel 0.6.0, and clojurescript 3196
>
> I can start a repl, start fighweel, get my browser to connect to it, start
> a weasel browser repl, and evaluate code.  What I can't do is anything
> involving a namespace.  When I switch namespaces in Cider, it looks like it
> switches; it can even autocomplete them.  However, whenever I try to
> evaluate any symbol at all, I get a stack trace like this:
>
> cljs.user> (ns octo-repos.background.github)
> octo-repos.background.github> get-repo-info
> WARNING: Use of undeclared Var /get-repo-info at line 1 <cljs repl>
> #<SyntaxError: Unexpected token .>
> SyntaxError: Unexpected token .
>     at http://localhost:3449/js/out/weasel/repl.js:28:470
>     at http://localhost:3449/js/out/weasel/repl.js:37:4
>     at cljs.core.MultiFn.call.G__11126__2 (
> http://localhost:3449/js/out/cljs/core.js:30919:113)
>     at cljs.core.MultiFn.call.G__11126 [as call] (
> http://localhost:3449/js/out/cljs/core.js:31623:20)
>     at null.<anonymous> (
> http://localhost:3449/js/out/weasel/repl.js:137:71)
>     at goog.events.EventTarget.fireListeners (
> http://localhost:3449/js/out/goog/events/eventtarget.js:285:23)
>     at Function.goog.events.EventTarget.dispatchEventInternal_ (
> http://localhost:3449/js/out/goog/events/eventtarget.js:382:26)
>     at goog.events.EventTarget.dispatchEvent (
> http://localhost:3449/js/out/goog/events/eventtarget.js:197:34)
>     at goog.net.WebSocket.onMessage_ (
> http://localhost:3449/js/out/goog/net/websocket.js:411:8)
>
> If I fully qualify all the symbols, though, it works:
>
>  octo-repos.background.github> octo-repos.background.github/get-repo-info
> WARNING: No such namespace: octo-repos.background.github, could not locate
> octo_repos/background/github.cljs or octo_repos/background/github.cljc at
> line 1 <cljs repl>
> WARNING: Use of undeclared Var octo-repos.background.github/get-repo-info
> at line 1 <cljs repl>
> #<function octo_repos$background$github$get_repo_info(owner,repo,token){
> ...<the compiled js body of my function>...
>
> Note that I get a warning about the undelcared var even though it
> successfully evaluates.  This one's fun:
>
> octo-repos.background.github> (def foo "foo")
> #<SyntaxError: Unexpected token .>
> SyntaxError: Unexpected token .
>     at http://localhost:3449/js/out/weasel/repl.js:28:470
>     at http://localhost:3449/js/out/weasel/repl.js:37:4
>     ...same stack trace as above....
>
> I actually tried to trace what was going on.  From my nrepl log, things
> look OK, you can see it's sending the namespace.
>
> (--->
>   ns  "octo-repos.background.github"
>   op  "eval"
>   session  "72a36d52-6b36-41b7-b0b5-da44f3971e06"
>   code  "(def foo \"foo\")\n"
>   id  "36"
> )
> (<-
>   ex  "class clojure.lang.ExceptionInfo"
>   id  "36"
>   root-ex  "class clojure.lang.ExceptionInfo"
>   session  "72a36d52-6b36-41b7-b0b5-da44f3971e06"
>   status  ("eval-error")
> )
>
> But by the time it gets to the browser, the code that it's asked to eval
> looks like this [This is from (def f "hi"), but same idea]:
>
> "(function (){try{return cljs.core.pr_str.call(null,(function (){var
> ret__5132__auto__ = .f = "hi"; cljs.core._STAR_3 = cljs.core._STAR_2;
> cljs.core._STAR_2 = cljs.core._STAR_1; cljs.core._STAR_1 =
> ret__5132__auto__; return ret__5132__auto__; })()); }catch (e24906){var
> e__5133__auto__ = e24906; cljs.core._STAR_e = e__5133__auto__; throw
> e__5133__auto__; }})()"
>
> So, I'm at a loss, I don't even know which component is causing the
> problem. I actually *can* use the repl, but I have to type out the
> namespace for every symbol.  Can anyone help?  Thanks
>
> --
> Evan
>
>
> --
> 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.
>

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