From e6997754d255c6d7ccb62439de261166c81a63ff Mon Sep 17 00:00:00 2001 From: lread Date: Fri, 14 Feb 2025 15:11:27 -0500 Subject: [PATCH 1/4] test-libs: use official rewrite-edn release my PR was merged! woot! --- script/test_libs.clj | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/script/test_libs.clj b/script/test_libs.clj index c89ab252..ae2c5f79 100755 --- a/script/test_libs.clj +++ b/script/test_libs.clj @@ -412,15 +412,11 @@ :show-deps-fn cli-deps-tree :test-cmds ["clojure -M:test"]} {:name "rewrite-edn" - ;; very temporarily use sha of my PR that addresses failure - ;; move back to release when PR is merged - :version "5659a1f650514d18c2356edeca16662e860ddd92" + :version "0.4.9" :platforms [:clj] :github-release {:repo "borkdude/rewrite-edn" - ;; very temporarily use sha of PR that addresses failure - ;; :version-prefix "v" - ;; :via :tag - :via :sha} + :version-prefix "v" + :via :tag} :patch-fn deps-edn-v1-patch :show-deps-fn cli-deps-tree :test-cmds ["clojure -M:test"]} From 8c998123b2b4942fd3cf6c7c9d410922e18fac4a Mon Sep 17 00:00:00 2001 From: lread Date: Fri, 14 Feb 2025 15:14:43 -0500 Subject: [PATCH 2/4] testing: fix test-helper Account for: multiple linebreaks are parsed into a single node --- test/rewrite_clj/zip/test_helper.cljc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/rewrite_clj/zip/test_helper.cljc b/test/rewrite_clj/zip/test_helper.cljc index ac29c36e..df7e9cf5 100644 --- a/test/rewrite_clj/zip/test_helper.cljc +++ b/test/rewrite_clj/zip/test_helper.cljc @@ -52,8 +52,14 @@ rows 0] (if (not zloc) (inc rows) - (if (or (z/linebreak? zloc) (n/comment? (z/node zloc))) + (cond + (z/linebreak? zloc) + (recur (z/prev* zloc) (+ rows (z/length zloc))) + + (n/comment? (z/node zloc)) (recur (z/prev* zloc) (inc rows)) + + :else (recur (z/prev* zloc) rows))))) (defn- col-num [zloc] From 25853fba69d951c17c5d7df3d4e465ae9e1c83d9 Mon Sep 17 00:00:00 2001 From: lread Date: Fri, 14 Feb 2025 15:18:42 -0500 Subject: [PATCH 3/4] test & ci: bump deps --- deps.edn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deps.edn b/deps.edn index 1c4ae779..06489eca 100644 --- a/deps.edn +++ b/deps.edn @@ -36,7 +36,7 @@ {;; for disabling the official compiler :classpath-overrides {org.clojure/clojure nil} :extra-deps {com.github.flow-storm/clojure {:mvn/version "1.12.0-3"} - com.github.flow-storm/flow-storm-dbg {:mvn/version "4.1.1"}} + com.github.flow-storm/flow-storm-dbg {:mvn/version "4.1.2"}} :jvm-opts ["-Dclojure.storm.instrumentEnable=true"]} :nrepl/jvm @@ -156,7 +156,7 @@ ;; ;; Deployment ;; - :build {:deps {io.github.clojure/tools.build {:mvn/version "0.10.6"}} + :build {:deps {io.github.clojure/tools.build {:mvn/version "0.10.7"}} :extra-paths ["src" "build"] :ns-default build} From 2a7b5ed2a2df540ef679543e801811b216940607 Mon Sep 17 00:00:00 2001 From: lread Date: Fri, 14 Feb 2025 15:32:50 -0500 Subject: [PATCH 4/4] lint: appease eastwood warning From eastwood: test/rewrite_clj/zip/test_helper.cljc:57:1: performance {:kind :recur}: recur arg for primitive local: rows is not matching primitive, had: Object, needed: long Could turn this linter off, but whatevs for now. --- test/rewrite_clj/zip/test_helper.cljc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/rewrite_clj/zip/test_helper.cljc b/test/rewrite_clj/zip/test_helper.cljc index df7e9cf5..8cdd6fbf 100644 --- a/test/rewrite_clj/zip/test_helper.cljc +++ b/test/rewrite_clj/zip/test_helper.cljc @@ -54,7 +54,7 @@ (inc rows) (cond (z/linebreak? zloc) - (recur (z/prev* zloc) (+ rows (z/length zloc))) + (recur (z/prev* zloc) (long (+ rows (z/length zloc)))) (n/comment? (z/node zloc)) (recur (z/prev* zloc) (inc rows))