|
235 | 235 | ;; |
236 | 236 |
|
237 | 237 | (defn- zprint-patch [{:keys [home-dir] :as lib}] |
238 | | - ;; zprint has a project.clj and a deps.edn, patch 'em both |
| 238 | + ;; zprint uses both deps.edn and project.clj, patch them both |
239 | 239 | (deps-edn-v1-patch lib) |
240 | 240 | (project-clj-v1-patch lib) |
241 | | - (status/line :detail "v1.4.1 fixup - can delete for subsequent versions") |
242 | | - (let [p (str (fs/file home-dir "project.clj"))] |
243 | | - (-> p |
244 | | - slurp |
245 | | - (string/replace #"\[lein-zprint \"1.2.4\"\]" |
246 | | - "[lein-zprint \"1.2.4.1\"]") |
247 | | - (->> (spit p)))) |
248 | | - ;; zprint 1.2.9 has a single failing test for https://github.com/clj-commons/rewrite-clj/pull/306 |
249 | | - ;; Have raised this with over at zprint https://github.com/kkinnear/zprint/issues/333 |
250 | | - ;; and have agreement that it is a zprint issue. |
251 | | - ;; Disable the failing test which starts on line 2538 |
252 | | - (status/line :detail "Patching for failing test in v1.2.9") |
253 | | - (let [p (str (fs/file home-dir "test/zprint/guide_test.cljc")) |
| 241 | + ;; zprint 1.3.0 has a single failing test (at least on linux). |
| 242 | + ;; See https://github.com/kkinnear/zprint/issues/355 |
| 243 | + ;; Disable the failing test which starts on line 211 |
| 244 | + (status/line :detail "Patching for failing test in v1.3.0") |
| 245 | + (let [p (str (fs/file home-dir "test/zprint/main_test.cljc")) |
254 | 246 | lines (-> p slurp string/split-lines) |
255 | | - new-lines (update lines 2537 #(str "#_" %))] |
| 247 | + new-lines (update lines 210 #(str "#_" %))] |
256 | 248 | (->> (string/join "\n" new-lines) |
257 | 249 | (spit p)))) |
258 | 250 |
|
259 | 251 | (defn- zprint-prep [{:keys [home-dir]}] |
260 | 252 | (status/line :detail "=> Building uberjar for uberjar tests") |
261 | | - (shcmd {:dir home-dir} "lein uberjar") |
262 | | - ;; not sure if this is still necessary... |
263 | | - (status/line :detail "=> Installing zprint locally for ClojureScript tests") |
264 | | - (shcmd {:dir home-dir} "lein install")) |
265 | | - |
266 | | -(defn- zprint-cleanup [_lib] |
267 | | - (status/line :detail "=> Deleting jar installed to local maven repo for tests") |
268 | | - ;; currently an over-clobber but official zprint libs will re-install as needed |
269 | | - (fs/delete-tree (fs/file (fs/home) ".m2/repository/zprint"))) |
| 253 | + (shcmd {:dir home-dir} "lein uberjar")) |
270 | 254 |
|
271 | 255 | ;; |
272 | 256 | ;; lib defs |
|
465 | 449 | :show-deps-fn lein-deps-tree |
466 | 450 | :test-cmds ["lein test"]} |
467 | 451 | {:name "zprint" |
468 | | - :version "1.2.9" |
469 | | - :note "1) planck cljs tests disabled for now: https://github.com/planck-repl/planck/issues/1088 2) failing v1.2.9 test disabled" |
| 452 | + :version "1.3.0" |
| 453 | + :note "1) planck cljs tests disabled for now: https://github.com/planck-repl/planck/issues/1088" |
470 | 454 | :platforms [:clj :cljs] |
471 | 455 | :github-release {:repo "kkinnear/zprint"} |
472 | 456 | :patch-fn zprint-patch |
473 | 457 | :prep-fn zprint-prep |
474 | 458 | :show-deps-fn (fn [lib] |
475 | | - (status/line :detail "=> Deps for Clojure run:") |
| 459 | + (status/line :detail "=> project.clj:") |
476 | 460 | (lein-deps-tree lib) |
477 | | - (status/line :detail "=> Deps Clojurescript run:") |
| 461 | + (status/line :detail "=> deps.edn:") |
478 | 462 | (cli-deps-tree lib)) |
479 | 463 | :test-cmds ["clojure -M:cljtest" |
480 | 464 | ;; disable zprint cljs tests for now, see https://github.com/planck-repl/planck/issues/1088 |
481 | 465 | #_"clojure -M:cljs-runner"] |
482 | 466 | ;; :requires ["planck"] ;; re-enable when cljs tests are re-enabled |
483 | | - :cleanup-fn zprint-cleanup}]) |
| 467 | + }]) |
484 | 468 |
|
485 | 469 | (defn- header [text] |
486 | 470 | (let [dashes (apply str (repeat 80 "-"))] |
|
0 commit comments