Skip to content

Commit

Permalink
Move special nrepl deps from :default profile to repl task.
Browse files Browse the repository at this point in the history
  • Loading branch information
technomancy committed Feb 20, 2012
1 parent 69b03bf commit 77d0abb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
10 changes: 2 additions & 8 deletions leiningen-core/src/leiningen/core/project.clj
Expand Up @@ -82,13 +82,7 @@
"Profiles get merged into the project map. The :dev and :user
profiles are active by default."
(atom {:default {:resources-path ["dev-resources"]
:test-path ["test"]
:dependencies '[[org.clojure/tools.nrepl "0.0.5"
:exclusions [org.clojure/clojure]]
[clojure-complete "0.1.4"
:exclusions [org.clojure/clojure]]
[org.thnetos/cd-client "0.3.3"
:exclusions [org.clojure/clojure]]]}
:test-path ["test"]}
:test {}
:debug {:debug true}}))

Expand Down Expand Up @@ -135,7 +129,7 @@

:else (doto latter (println "has a type mismatch merging profiles."))))

(defn- merge-profile [project profile]
(defn merge-profile [project profile]
(merge-with-key profile-key-merge project profile))

(defn- lookup-profile [profiles profile-name]
Expand Down
10 changes: 9 additions & 1 deletion src/leiningen/repl.clj
Expand Up @@ -6,11 +6,19 @@
[leiningen.core.eval :as eval]
[clojure.tools.nrepl :as nrepl]
[leiningen.core.user :as user]
[leiningen.core.project :as project]
[leiningen.core.classpath :as classpath]))

(def profile {:dependencies '[[org.clojure/tools.nrepl "0.0.5"
:exclusions [org.clojure/clojure]]
[clojure-complete "0.1.4"
:exclusions [org.clojure/clojure]]
[org.thnetos/cd-client "0.3.3"
:exclusions [org.clojure/clojure]]]})

(defn- start-server [project port ack-port]
(if project
(eval/eval-in-project project
(eval/eval-in-project (project/merge-profile project profile)
`(clojure.tools.nrepl/start-server ~port ~ack-port)
'(do (require 'clojure.tools.nrepl)
(require 'complete)))
Expand Down

0 comments on commit 77d0abb

Please sign in to comment.