-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
*cljs-compiler-env* does not get set on setup error #62
Comments
Looking at the groups thread, I only see mention of |
Yes the error is related to my Javascript environment. But what I wanted you to take note of was that any such error which is happening on first call to (defn cljs-repl
"Starts a ClojureScript REPL over top an nREPL session. Accepts
all options usually accepted by e.g. cljs.repl/repl."
[repl-env & {:as options}]
;; TODO I think we need a var to set! the compiler environment from the REPL
;; environment after each eval
(try
(let [repl-env (delegating-repl-env repl-env nil)]
(set! ana/*cljs-ns* 'cljs.user)
;; this will implicitly set! *cljs-compiler-env*
(run-cljs-repl (assoc ieval/*msg* ::first-cljs-repl true)
(nrepl/code
(+ 1)
;; (ns cljs.user
;; (:require
;; [clojure.browser.repl]
;; [cljs.repl :refer-macros (source doc find-doc
;; apropos dir pst)]))
)
repl-env nil options)
;; (clojure.pprint/pprint (:options @*cljs-compiler-env*))
(set! *cljs-repl-env* repl-env)
(set! *cljs-repl-options* options)
;; interruptible-eval is in charge of emitting the final :ns response in this context
(set! *original-clj-ns* *ns*)
(set! *ns* (find-ns ana/*cljs-ns*))
(println "To quit, type::" :cljs/quit))
(catch Exception e
(set! *cljs-repl-env* nil)
(throw e)))) I hope the issue is clear enough. This took me days to observe as I was not familiar with the new changes made from 1.6. |
Okay, I see what you mean now. The fix for this would be to have Of course, this won't fix the underlying problem (which does not require piggieback to reproduce, IIRC?). |
Is this still an issue? |
When starting the cljs-repl of piggieback the
*cljs-compiler-env*
does not get set causing the repl to bootstrap cljs.core on every evaluation. There should be a provision for setup errors so that the env gets reset properly.The actual error causing it in my case is reported here:
https://groups.google.com/forum/#!topic/clojurescript/ewRpTfSOYq8
Thanks,
John
The text was updated successfully, but these errors were encountered: