Closed jmckitrick closed 9 years ago
This seems to happen only when lein trampoline repl
is used, and it doesn't seem Weasel-specific. The same error occurs when using Piggieback with the Node.js REPL, for example:
user=> (require '[cljs.repl :as repl])
nil
user=> (require '[cljs.repl.node :as node])
nil
user=> (cemerick.piggieback/cljs-repl
#_=> :repl-env (node/repl-env)
#_=> :output-dir ".cljs_node_repl"
#_=> :cache-analysis true
#_=> :source-map true)
IllegalStateException Can't change/establish root binding of: *cljs-repl-options* with set clojure.lang.Var.set (Var.java:221)
I don't think this is Weasel's issue.
See also https://github.com/cemerick/piggieback/issues/7#issuecomment-21796140 (edit: updated with more specific link). Maybe it's a configuration issue? I don't use lein trampoline
so I'm afraid I can't be much help :smiley:
I have this same problem and I was wondering what's causing it. I initially thought it was from lein trampoline
but I tried using lein run
and I had the exact same IllegalStateException
. Here's my configuration:
(defproject ramsey "1.0.0-SNAPSHOT"
:description "Clojure web app"
:jvm-opts []
:url "http://exampleapp.herokuapp.com"
:license {:name "Eclipse Public License v1.0"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:main ramsey.web
:dependencies
[; CLOJURE
[org.clojure/clojure "1.7.0-alpha5"]
[compojure "1.1.8" ]
[ring/ring-jetty-adapter "1.2.2" ]
[environ "0.5.0" ]
; CLOJURESCRIPT
[org.clojure/clojurescript "0.0-2913" ]
[org.omcljs/om "0.8.8" ]
[racehub/om-bootstrap "0.3.1" ]
[sablono "0.2.20" ]
[weasel "0.6.0" ]]
:min-lein-version "2.0.0"
:plugins
[[environ/environ.lein "0.2.1"]
[lein-cljsbuild "1.0.5"]]
:cljsbuild {
:builds [{:id "ramsey"
:source-paths ["src/cljs"]
:compiler {
:output-to "ramsey.js"
:output-dir "out"
:optimizations :none ; CHANGE THIS
:source-map true}}]}
:hooks [environ.leiningen.hooks]
:uberjar-name "ramsey-standalone.jar"
:profiles
{:dev
{:dependencies [[com.cemerick/piggieback "0.1.5"]]
:plugins
[[com.cemerick/austin "0.1.6"]
[com.cemerick/piggieback "0.1.5"]]
:repl-options
{:nrepl-middleware
[cemerick.piggieback/wrap-cljs-repl]}}
:production {:env {:production true}}})
It may be true that this isn't Weasel's issue, as you say — so I'll post something similar on the piggieback Git repo and ask the same question.
Thanks for your help!
Here's what I'm getting running
lein trampoline repl