Stacktrace with com.cemerick/piggieback 0.1.5

65 views
Skip to first unread message

Akiva Schoen

unread,
Feb 26, 2015, 1:31:35 PM2/26/15
to clojur...@googlegroups.com
Hi all,

I'm trying to attach weasel (and thus piggieback) to a project that's been retrofitted with chestnut. When I try to kick weasel off, though, piggieback is fighting back with the following REPL stacktrace:

java.lang.IllegalStateException: Can't change/establish root binding of: *cljs-repl-options* with set
                          ...                                       
cemerick.piggieback/cljs-repl                    piggieback.clj:  177
                          ...                                       
 furthermore.dev/browser-repl                           dev.clj:   11
 furthermore.server/eval15091  form-init2477468269680286446.clj:    1
                          ...                                       
            clojure.core/eval                          core.clj: 3076


The code I'm executing to get to this:

(defn browser-repl []
  (let [repl-env (weasel/repl-env :ip "0.0.0.0" :port 9001)]
    (piggieback/cljs-repl :repl-env repl-env) ;; <—— This is dev.clj:11 from the stacktrace
    (piggieback/cljs-eval repl-env '(in-ns 'furthermore.core) {})))

This was lifted almost verbatin (except the namespace, of course) from chestnut.

I've tried a freshly created chestnut app (with both current and snapshot) and the same error occurs when (browser-repl) is called.

Any help would be greatly appreciated.

Thanks!
--
Akiva

Michael Griffiths

unread,
Feb 26, 2015, 2:07:49 PM2/26/15
to clojur...@googlegroups.com
How are you starting your clojure REPL? I've seen this caused by using `lein trampoline repl`, only workaround I know of is to not use trampoline.

Otherwise - what are your cljs and weasel versions?

Akiva Schoen

unread,
Feb 26, 2015, 2:51:48 PM2/26/15
to clojur...@googlegroups.com
I'm just issuing a straight `lein repl`. CLJS is at 0.0-2913 and weasel is 0.6.0.

In the meanwhile, I noticed that Figwheel has a REPL baked in since 0.2.2-SNAPSHOT which, I believe, does what weasel does. I've been able to get that going without a hitch.

Chas Emerick

unread,
Feb 27, 2015, 10:45:54 AM2/27/15
to clojur...@googlegroups.com
Sounds like you don't have piggieback's nREPL middleware bit hooked up?

https://github.com/cemerick/piggieback#usage

Best added in the :dev profile, as shown in weasel's example:

https://github.com/tomjakubowski/weasel/blob/master/weasel-example/project.clj#L21

- Chas
--
You received this message because you are subscribed to the Google Groups "clojure-tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure-tool...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Akiva Schoen

unread,
Feb 27, 2015, 2:15:50 PM2/27/15
to clojur...@googlegroups.com
Interestingly, I did have it hooked up. In fact, looking at my project.clj,
I still have it wired up in spite of me relying on Figwheel's REPL now. I
had looked at both Chestnut and Weasel and mimicked what I had seen in
their setups.
Reply all
Reply to author
Forward
0 new messages