Skip to content

Commit b45c0ff

Browse files
committed
libs tests: new release of carve (woot!)
This allows us to retire our canary patches for rewrite-cljc, which I was accidentally (and harmlessly) also applying to the depot project.
1 parent 78d1a2f commit b45c0ff

File tree

1 file changed

+3
-24
lines changed

1 file changed

+3
-24
lines changed

script/test_libs.clj

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -114,18 +114,6 @@
114114
(defn- cli-deps-tree [lib]
115115
(deps-tree lib "clojure -Stree"))
116116

117-
(defn- patch-rewrite-cljc-sources [home-dir]
118-
(status/line :detail "=> Patching sources")
119-
(doall (map (fn [f]
120-
(let [f (fs/file f)
121-
content (slurp f)
122-
new-content (string/replace content #"(\[rewrite-)cljc(\.\w+\s+:as\s+\w+\])"
123-
"$1clj$2")]
124-
(when (not= content new-content)
125-
(status/line :detail "- patching source: %s" f)
126-
(spit f new-content))))
127-
(fs/glob home-dir "**/*.{clj,cljc,cljs}"))))
128-
129117
(defn- patch-deps [{:keys [filename] :as opts}]
130118
(status/line :detail "=> Patching deps in: %s" filename)
131119
(if (string/ends-with? filename "deps.edn")
@@ -159,6 +147,7 @@
159147
(let [{:keys [exit]} (shcmd {:dir home-dir :continue true}
160148
"git --no-pager diff --exit-code")]
161149
(when (zero? exit)
150+
162151
(status/die 1 "found no changes, patch must have failed" ))))
163152

164153
;;
@@ -171,15 +160,6 @@
171160
:additions [['org.clojure/tools.reader "1.3.6"]
172161
['rewrite-clj rewrite-clj-version]]}))
173162

174-
;;
175-
;; carve
176-
;;
177-
(defn carve-patch [{:keys [home-dir rewrite-clj-version]}]
178-
(patch-deps {:filename (str (fs/file home-dir "deps.edn"))
179-
:removals #{'borkdude/rewrite-cljc}
180-
:additions [['rewrite-clj/rewrite-clj {:mvn/version rewrite-clj-version}]]})
181-
(patch-rewrite-cljc-sources home-dir))
182-
183163
;;
184164
;; clojure-lsp
185165
;;
@@ -196,7 +176,6 @@
196176
(patch-deps {:filename (str (fs/file home-dir "deps.edn"))
197177
:removals #{'rewrite-clj/rewrite-clj}
198178
:additions [['rewrite-clj/rewrite-clj {:mvn/version rewrite-clj-version}]]})
199-
(patch-rewrite-cljc-sources home-dir)
200179
(status/line :detail "=> depot uses but does not require rewrite-clj.node, need to adjust for rewrite-clj v1")
201180
(replace-in-file (str (fs/file home-dir "src/depot/zip.clj"))
202181
"[rewrite-clj.zip :as rzip]"
@@ -285,11 +264,11 @@
285264
:show-deps-fn cli-deps-tree
286265
:test-cmds ["clojure -M:dev:test"]}
287266
{:name "carve"
288-
:version "0.0.2"
267+
:version "0.1.0"
289268
:platforms [:clj]
290269
:github-release {:repo "borkdude/carve"
291270
:version-prefix "v"}
292-
:patch-fn carve-patch
271+
:patch-fn deps-edn-v1-patch
293272
:show-deps-fn cli-deps-tree
294273
:test-cmds ["clojure -M:test"]}
295274
{:name "cljfmt"

0 commit comments

Comments
 (0)