-
-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The repl task is special because it can't run in a pod. It needs to run in the project context and have access to the environment of the build.boot script. In order to keep the project classpath pristine when the REPL is not in use, the nREPL dependencies are not loaded until the repl task actually needs to run. This presents difficulties with middleware, since most of these are in namespaces that assume tools.nrepl is available. To support middlware in this environment we expose two atoms: - boot.repl/*default-dependencies* atom containing a vector of maven coordinates in the (set-env! :dependencies '[...]) format. These dependencies will be added only when the repl task is run, and only if the project does not already have explicit dependencies for the deps it would otherwise load. - boot.repl/*default-middleware* atom containing a vector of namespace qualified symbols corresponding to desired middleware. The repl task will resolve them at runtime as necessary, so they don't need to be resolvable from the build.boot. Modify these to change dependencies or middleware loaded by default by the repl task. The middleware option to the repl task adds middleware in addition to these defaults. The handler option will override these.
- Loading branch information
Showing
4 changed files
with
48 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
(ns boot.repl) | ||
|
||
(def ^:dynamic *default-dependencies* | ||
(atom '[[org.clojure/tools.nrepl "0.2.4"]])) | ||
|
||
(def ^:dynamic *default-middleware* | ||
(atom ['boot.from.io.aviso.nrepl/pretty-middleware])) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters