Avoid EDN read error in scittle nREPL
This commit is contained in:
parent
9791c281e3
commit
719de62423
1 changed files with 3 additions and 2 deletions
|
|
@ -13,7 +13,8 @@
|
||||||
(.send (nrepl-websocket)
|
(.send (nrepl-websocket)
|
||||||
(str
|
(str
|
||||||
(let [ns (or ns (str @!last-ns))]
|
(let [ns (or ns (str @!last-ns))]
|
||||||
(assoc payload :id id :session session :ns ns)))))
|
(-> (assoc payload :id id :session session :ns ns)
|
||||||
|
(dissoc :ctx))))))
|
||||||
|
|
||||||
(defn handle-nrepl-eval [{:keys [code] :as msg}]
|
(defn handle-nrepl-eval [{:keys [code] :as msg}]
|
||||||
(let [[kind val] (try [::success (eval-string code)]
|
(let [[kind val] (try [::success (eval-string code)]
|
||||||
|
|
@ -68,7 +69,7 @@
|
||||||
(defn handle-nrepl-message [msg]
|
(defn handle-nrepl-message [msg]
|
||||||
(if-let [handler (ops (:op msg))]
|
(if-let [handler (ops (:op msg))]
|
||||||
(handler msg)
|
(handler msg)
|
||||||
(nrepl-reply (merge msg {:status ["error" "done"] :err "unkown-op"}) (assoc msg :ctx (store/get-ctx)))))
|
(nrepl-reply (merge msg {:status ["error" "done"] :err "unkown-op"}) msg)))
|
||||||
|
|
||||||
(defn ws-url [host port path]
|
(defn ws-url [host port path]
|
||||||
(str "ws://" host ":" port "/" path))
|
(str "ws://" host ":" port "/" path))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue