Browse files

Move :eval-in-leiningen binding of *ns* to eval-in-project.

  • Loading branch information...
1 parent dfb4b75 commit 7137730e90660e09bd3d658b2d59d2b8d1ae33ab @technomancy technomancy committed Jun 23, 2011
Showing with 8 additions and 9 deletions.
  1. +2 −1 src/leiningen/compile.clj
  2. +2 −3 src/leiningen/deps.clj
  3. +4 −5 src/leiningen/interactive.clj
View
3 src/leiningen/compile.clj
@@ -160,7 +160,8 @@
(when (:debug project)
(System/setProperty "clojure.debug" "true"))
;; need to at least pretend to return an exit code
- (try (binding [*warn-on-reflection* (:warn-on-reflection project)]
+ (try (binding [*warn-on-reflection* (:warn-on-reflection project)
+ *ns* *ns*]
(eval (read-string (get-readable-form nil project form init))))
0
(catch Exception e
View
5 src/leiningen/deps.clj
@@ -129,9 +129,8 @@
(let [deps-task (make-deps-task project deps-set)]
(when (seq (deps-set project))
(.execute deps-task)
- (when-not (or (and (:local-repo-classpath project)
- (= :dependencies deps-set))
- (:eval-in-leiningen project))
+ (when-not (and (:local-repo-classpath project)
+ (= :dependencies deps-set))
(.mkdirs (File. (:library-path project)))
(copy-dependencies (:jar-behavior project)
;; Leiningen's process only has access to lib/dev.
View
9 src/leiningen/interactive.clj
@@ -64,11 +64,10 @@
(let [[port host] (repl-socket-on project)]
(println welcome)
(future
- (binding [*ns* *ns*]
- (eval-in-project project `(do ~(repl-server project host port
- :prompt '(constantly ""))
- ;; can't stop return value from printing
- (symbol "")))))
+ (eval-in-project project `(do ~(repl-server project host port
+ :prompt '(constantly ""))
+ ;; can't stop return value from printing
+ (symbol ""))))
(let [connect #(poll-repl-connection port 0 vector)]
(binding [eval-in-project (partial eval-in-repl connect)
*exit-after-tests* false

0 comments on commit 7137730

Please sign in to comment.