Skip to content
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

Respect :file in msg when evaluating forms #127

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/cider/piggieback_impl.clj
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,10 @@
(set! *e e#)
(throw e#))))))

(defn eval-cljs [repl-env env form opts]
(defn eval-cljs [repl-env env form file opts]
(cljs.repl/evaluate-form repl-env
env
"<cljs repl>"
(or file "<cljs repl>")
form
((:wrap opts
(if (contains? #{"nrepl.util.print/pr" "cider.nrepl.pprint/pr"} (::print opts))
Expand All @@ -267,7 +267,7 @@
{#'*out* (replying-PrintWriter :out msg {})
#'*err* (replying-PrintWriter :err msg {})}))

(defn do-eval [{:keys [session transport ^String code ns] :as msg}]
(defn do-eval [{:keys [session transport ^String code file ns] :as msg}]
(with-bindings (merge {#'ana/*cljs-warnings* ana/*cljs-warnings*
#'ana/*cljs-warning-handlers* ana/*cljs-warning-handlers*
#'ana/*unchecked-if* ana/*unchecked-if*
Expand All @@ -294,6 +294,7 @@
(eval-cljs repl-env
env
form
file
(assoc repl-options
::print
(:nrepl.middleware.print/print msg)))))]
Expand Down