Skip to content

Commit

Permalink
honor :repl-requires
Browse files Browse the repository at this point in the history
I’m not entirely certain why this code is needed to respect
:repl-requires as the option is getting forwarded to the cljs.repl/repl
call. Alas it is needed and this works.
  • Loading branch information
Bruce Hauman committed Aug 24, 2018
1 parent 52bd059 commit 148bc01
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/cider/piggieback.clj
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,12 @@
(set! ana/*cljs-ns* 'cljs.user)
;; this will implicitly set! *cljs-compiler-env*
(run-cljs-repl (assoc ieval/*msg* ::first-cljs-repl true)
;; TODO: This needs to be looked at
(nrepl/code (ns cljs.user
(:require [cljs.repl :refer-macros (source doc find-doc
apropos dir pst)])))
;; this is needed to respect :repl-requires
(if-let [requires (not-empty (:repl-requires opts))]
(pr-str (cons 'ns `(cljs.user (:require ~@requires))))
(nrepl/code (ns cljs.user
(:require [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)
Expand Down

0 comments on commit 148bc01

Please sign in to comment.