Skip to content

Commit

Permalink
Remove cljs-compat.
Browse files Browse the repository at this point in the history
  • Loading branch information
mneise committed Feb 22, 2016
1 parent 48e50db commit e265b25
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 96 deletions.
6 changes: 0 additions & 6 deletions bin/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@

pushd cljs-compat
lein do clean, deploy clojars
popd

pushd support
lein do clean, deploy clojars
popd

pushd plugin
# needed to allow for post-release updates to cljs-compat
export LEIN_SNAPSHOTS_IN_RELEASE=true
lein do clean, deploy clojars
popd
5 changes: 1 addition & 4 deletions bin/test-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@ projects="$@"
project_root=$(dirname $0)/..
pushd $project_root

# needed to allow for post-release updates to cljs-compat
export LEIN_SNAPSHOTS_IN_RELEASE=true

rm -rf ~/.m2/repository/lein-cljsbuild ~/.m2/repository/cljsbuild/
for d in cljs-compat support plugin; do
for d in support plugin; do
pushd $d
lein do clean, install, test
popd
Expand Down
12 changes: 0 additions & 12 deletions cljs-compat/project.clj

This file was deleted.

26 changes: 0 additions & 26 deletions cljs-compat/src/cljsbuild/compat.clj

This file was deleted.

13 changes: 0 additions & 13 deletions cljs-compat/test/cljsbuild/compat_test.clj

This file was deleted.

4 changes: 1 addition & 3 deletions plugin/project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
{:name "Eclipse Public License - v 1.0"
:url "http://www.eclipse.org/legal/epl-v10.html"
:distribution :repo}
:dependencies [; SNAPSHOT is intentional here, https://github.com/emezeske/lein-cljsbuild/issues/266
[lein-cljsbuild/cljs-compat "1.0.0-SNAPSHOT"]
[fs "1.1.2"]]
:dependencies [[fs "1.1.2"]]
:profiles {
:dev {
:dependencies [
Expand Down
40 changes: 8 additions & 32 deletions plugin/src/leiningen/cljsbuild/subproject.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"Utilities for running cljsbuild in a subproject"
(:require
[leiningen.core.main :as lmain]
[cljsbuild.compat :as cljs-compat]
[clojure.java.io :refer (resource)]
[clojure.string :as string]))

Expand Down Expand Up @@ -59,38 +58,15 @@
(defn merge-dependencies [project-dependencies]
(let [project (dependency-map project-dependencies)
desired-cljs-version ('org.clojure/clojurescript project)
cljsbuild (dependency-map cljsbuild-dependencies)
{acceptable-cljs-range :cljs} (cljs-compat/matrix cljsbuild-version)
cljs-version-message [(format "You're using [lein-cljsbuild \"%s\"]," cljsbuild-version)
"which is known to work"
"well with ClojureScript" (first acceptable-cljs-range)
"-" (str (or (second acceptable-cljs-range) "*") ".")]]
cljsbuild (dependency-map cljsbuild-dependencies)]
(check-clojure-version project)
(if desired-cljs-version
(when acceptable-cljs-range
; https://github.com/emezeske/lein-cljsbuild/issues/287
; we could emit a warning here indicating that we couldn't verify the cljsbuild/CLJS
; version pairing, but that would likely just confuse people
(when-not (cljs-compat/version-in-range? (first desired-cljs-version) acceptable-cljs-range)
(print "\033[31m")
(apply println (concat cljs-version-message
["You are attempting to use ClojureScript"
(str (first desired-cljs-version) ",")
"which is not within this range. This build may fail due to a"
"hard API incompatibility, or simply yield undefined or incorrect"
"ClojureScript compilation output. Your best next step would be to"
"change your ClojureScript dependency to fit in the range, or"
"change your lein-cljsbuild plugin dependency to one that supports"
"ClojureScript" (str (first desired-cljs-version) ".")
"\033[0m"]))))
(do
(println "\033[33mWARNING: It appears your project does not contain a ClojureScript"
"dependency. One will be provided for you by lein-cljsbuild, but it"
"is strongly recommended that you add your own. You can find a list"
"of all ClojureScript releases here:")
(println "http://search.maven.org/#search|gav|1|g%3A%22org.clojure%22%20AND%20a%3A%22clojurescript%22")
(when acceptable-cljs-range (apply println cljs-version-message))
(println "\033[0m")))
(when-not desired-cljs-version
(println "\033[33mWARNING: It appears your project does not contain a ClojureScript"
"dependency. One will be provided for you by lein-cljsbuild, but it"
"is strongly recommended that you add your own. You can find a list"
"of all ClojureScript releases here:")
(println "http://search.maven.org/#search|gav|1|g%3A%22org.clojure%22%20AND%20a%3A%22clojurescript%22")
(println "\033[0m"))
(->> (reduce-kv array-map-assoc cljsbuild project)
(map (fn [[k v]] (vec (cons k v)))))))

Expand Down

0 comments on commit e265b25

Please sign in to comment.