Skip to content

Commit ba0a0e4

Browse files
committed
Drop support for cemerick/piggieback
This commit also paves the way for renaming the cider.piggieback ns to piggieback.core down the road (for consistency with the rest of the nREPL projects).
1 parent 5099ce0 commit ba0a0e4

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/cider/nrepl/middleware/util/cljs.clj

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
(ns cider.nrepl.middleware.util.cljs)
22

3-
;; piggieback 0.3 changed the namespace of the library, so in
4-
;; order to support 0.2 and 0.3 we need to do a bit of extra work
3+
;; there's a plan to rename the main namespace of
4+
;; piggieback to piggieback.core and the following code
5+
;; simply paves the way for this
56
(def cider-piggieback?
67
(try (require 'cider.piggieback) true
78
(catch Throwable _ false)))
89

9-
(def cemerick-piggieback?
10-
(try (require 'cemerick.piggieback) true
10+
(def nrepl-piggieback?
11+
(try (require 'piggieback.core) true
1112
(catch Throwable _ false)))
1213

1314
(defn try-piggieback
@@ -16,7 +17,7 @@
1617
[]
1718
(cond
1819
cider-piggieback? (resolve 'cider.piggieback/wrap-cljs-repl)
19-
cemerick-piggieback? (resolve 'cemerick.piggieback/wrap-cljs-repl)
20+
nrepl-piggieback? (resolve 'piggieback.core/wrap-cljs-repl)
2021
:else false))
2122

2223
(defn- maybe-piggieback
@@ -41,8 +42,8 @@
4142
"Returns the path in the session map for the ClojureScript compiler
4243
environment used by piggieback."
4344
[]
44-
[(if cemerick-piggieback?
45-
(resolve 'cemerick.piggieback/*cljs-compiler-env*)
45+
[(if nrepl-piggieback?
46+
(resolve 'piggieback.core/*cljs-compiler-env*)
4647
(resolve 'cider.piggieback/*cljs-compiler-env*))])
4748

4849
(defn- maybe-deref

0 commit comments

Comments
 (0)