From 0b649cd662266cb4e36a6a086531d3bf32e35843 Mon Sep 17 00:00:00 2001 From: dotemacs Date: Mon, 10 Jul 2023 13:23:36 +0200 Subject: [PATCH] Update deps --- .circleci/config.yml | 10 ++--- Makefile | 2 +- project.clj | 41 +++++++++---------- src/refactor_nrepl/middleware.clj | 20 ++++----- src/refactor_nrepl/s_expressions.clj | 2 +- test/refactor_nrepl/ns/class_search_test.clj | 5 ++- .../rename_file_or_dir_test.clj | 7 +++- 7 files changed, 45 insertions(+), 42 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index df44fd41..8ba6b193 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -117,17 +117,17 @@ jobs: util_job: description: | Running utility commands/checks (linter etc.) - Always uses Java LTS latest and Clojure 1.10 + Always uses Java LTS latest and Clojure 1.11 parameters: steps: type: steps executor: openjdk17 environment: - VERSION: "1.10" + VERSION: "1.11" steps: - checkout - with_cache: - cache_version: "1.10" + cache_version: "1.11" steps: << parameters.steps >> deploy: @@ -188,7 +188,7 @@ jobs: # # - run tests against the target matrix # - All our defined JDKs -# - Clojure 1.8, 1.9, 1.10, master +# - Clojure 1.10, 1.11, master # - linter, eastwood and cljfmt # - runs code coverage report @@ -199,7 +199,7 @@ workflows: - test_code: matrix: parameters: - clojure_version: ["1.8", "1.9", "1.10", "master"] + clojure_version: ["1.10", "1.11", "master"] jdk_version: [openjdk8, openjdk11, openjdk16, openjdk17] filters: branches: diff --git a/Makefile b/Makefile index fafd94b7..362a56dd 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ .PHONY: inline-deps test deploy clean -VERSION ?= 1.10 +VERSION ?= 1.11 clean: lein clean diff --git a/project.clj b/project.clj index 45fbffa8..0bcd7a2a 100644 --- a/project.clj +++ b/project.clj @@ -6,17 +6,17 @@ :url "https://github.com/clojure-emacs/refactor-nrepl" :license {:name "Eclipse Public License" :url "https://www.eclipse.org/legal/epl-v10.html"} - :dependencies [[nrepl "0.9.0"] - ^:inline-dep [compliment "0.3.12"] - ^:inline-dep [http-kit "2.5.3"] - ^:inline-dep [org.clojure/data.json "2.3.1"] - ^:inline-dep [org.clojure/tools.analyzer.jvm "1.2.2"] + :dependencies [[nrepl "1.0.0"] + ^:inline-dep [compliment "0.4.0"] + ^:inline-dep [http-kit "2.7.0"] + ^:inline-dep [org.clojure/data.json "2.4.0"] + ^:inline-dep [org.clojure/tools.analyzer.jvm "1.2.3"] ^:inline-dep [org.clojure/tools.namespace "1.1.0" :exclusions [org.clojure/tools.reader]] ^:inline-dep [org.clojure/tools.reader "1.3.6"] - ^:inline-dep [cider/orchard "0.9.1"] - ^:inline-dep [cljfmt "0.8.0" :exclusions [rewrite-clj rewrite-cljs]] + ^:inline-dep [cider/orchard "0.12.0"] + ^:inline-dep [cljfmt "0.9.2" :exclusions [rewrite-clj rewrite-cljs]] ^:inline-dep [clj-commons/fs "1.6.310"] - ^:inline-dep [rewrite-clj "1.0.699-alpha"] + ^:inline-dep [rewrite-clj "1.1.47"] ^:inline-dep [version-clj "1.0.0"]] :exclusions [org.clojure/clojure] ; see versions matrix below @@ -34,25 +34,24 @@ :unresolved-tree false} :filespecs [{:type :bytes :path "refactor-nrepl/refactor-nrepl/project.clj" :bytes ~(slurp "project.clj")}] :profiles {;; Clojure versions matrix - :provided {:dependencies [[cider/cider-nrepl "0.28.3"] - [org.clojure/clojure "1.10.3"] + :provided {:dependencies [[cider/cider-nrepl "0.31.0"] + [org.clojure/clojure "1.11.1"] ;; For satisfying `:pedantic?`: [com.google.code.findbugs/jsr305 "3.0.2"] - [com.google.errorprone/error_prone_annotations "2.1.3"]]} - :1.8 {:dependencies [[org.clojure/clojure "1.8.0"]]} - :1.9 {:dependencies [[org.clojure/clojure "1.9.0"]]} + [com.google.errorprone/error_prone_annotations "2.20.0"]]} :1.10 {:dependencies [[org.clojure/clojure "1.10.3"]]} + :1.11 {:dependencies [[org.clojure/clojure "1.11.1"]]} :master {:repositories [["snapshots" "https://oss.sonatype.org/content/repositories/snapshots"]] - :dependencies [[org.clojure/clojure "1.11.0-master-SNAPSHOT"] - [org.clojure/clojure "1.11.0-master-SNAPSHOT" :classifier "sources"]]} + :dependencies [[org.clojure/clojure "1.12.0-master-SNAPSHOT"] + [org.clojure/clojure "1.12.0-master-SNAPSHOT" :classifier "sources"]]} :test {:dependencies [[print-foo "1.0.2"]]} - :dev {:dependencies [[org.clojure/clojurescript "1.10.879"] - [org.clojure/core.async "1.3.618" :exclusions [org.clojure/clojure org.clojure/tools.reader]] - [cider/piggieback "0.5.2"] - [commons-io/commons-io "2.8.0"]] + :dev {:dependencies [[org.clojure/clojurescript "1.11.60"] + [org.clojure/core.async "1.6.673" :exclusions [org.clojure/clojure org.clojure/tools.reader]] + [cider/piggieback "0.5.3"] + [commons-io/commons-io "2.13.0"]] :repl-options {:nrepl-middleware [cider.piggieback/wrap-cljs-repl]} :jvm-opts ["-Dorchard.use-dynapath=false"] :java-source-paths ["java-test"] @@ -60,7 +59,7 @@ "testproject/src"] :repositories [["snapshots" "https://oss.sonatype.org/content/repositories/snapshots"]]} :cljfmt [:test - {:plugins [[lein-cljfmt "0.8.0" :exclusions [org.clojure/clojure + {:plugins [[lein-cljfmt "0.9.2" :exclusions [org.clojure/clojure org.clojure/clojurescript]]] :cljfmt {:indents {as-> [[:inner 0]] as->* [[:inner 0]] @@ -69,7 +68,7 @@ with-debug-bindings [[:inner 0]] merge-meta [[:inner 0]] try-if-let [[:block 1]]}}}] - :eastwood {:plugins [[jonase/eastwood "1.2.3"]] + :eastwood {:plugins [[jonase/eastwood "1.4.0"]] :eastwood {;; :implicit-dependencies would fail spuriously when the CI matrix runs for Clojure < 1.10, ;; because :implicit-dependencies can only work for a certain corner case starting from 1.10. :exclude-linters [:implicit-dependencies] diff --git a/src/refactor_nrepl/middleware.clj b/src/refactor_nrepl/middleware.clj index 1bdb5ee8..6afd6db9 100644 --- a/src/refactor_nrepl/middleware.clj +++ b/src/refactor_nrepl/middleware.clj @@ -105,14 +105,14 @@ (def ^:private resolve-missing (delay - (require-and-resolve 'refactor-nrepl.ns.resolve-missing/resolve-missing))) + (require-and-resolve 'refactor-nrepl.ns.resolve-missing/resolve-missing))) (defn resolve-missing-reply [{:keys [transport] :as msg}] (reply transport msg :candidates (@resolve-missing msg) :status :done)) (def ^:private find-symbol (delay - (require-and-resolve 'refactor-nrepl.find.find-symbol/find-symbol))) + (require-and-resolve 'refactor-nrepl.find.find-symbol/find-symbol))) (defn- find-symbol-reply [{:keys [transport] :as msg}] (let [occurrences (@find-symbol msg)] @@ -140,18 +140,18 @@ (def ^:private clean-ns (delay - (require-and-resolve 'refactor-nrepl.ns.clean-ns/clean-ns))) + (require-and-resolve 'refactor-nrepl.ns.clean-ns/clean-ns))) (def ^:private pprint-ns (delay - (require-and-resolve 'refactor-nrepl.ns.pprint/pprint-ns))) + (require-and-resolve 'refactor-nrepl.ns.pprint/pprint-ns))) (defn- clean-ns-reply [{:keys [transport] :as msg}] (reply transport msg :ns (some-> msg (@clean-ns) (@pprint-ns)) :status :done)) (def ^:private find-used-locals (delay - (require-and-resolve 'refactor-nrepl.find.find-locals/find-used-locals))) + (require-and-resolve 'refactor-nrepl.find.find-locals/find-used-locals))) (defn- find-used-locals-reply [{:keys [transport] :as msg}] (reply transport msg :used-locals (@find-used-locals msg) :status :done)) @@ -161,7 +161,7 @@ (def ^:private warm-ast-cache (delay - (require-and-resolve 'refactor-nrepl.analyzer/warm-ast-cache))) + (require-and-resolve 'refactor-nrepl.analyzer/warm-ast-cache))) (defn- warm-ast-cache-reply [{:keys [transport] :as msg}] (reply transport msg :status :done @@ -180,14 +180,14 @@ (def ^:private extract-definition (delay - (require-and-resolve 'refactor-nrepl.extract-definition/extract-definition))) + (require-and-resolve 'refactor-nrepl.extract-definition/extract-definition))) (defn- extract-definition-reply [{:keys [transport] :as msg}] (reply transport msg :status :done :definition (pr-str (@extract-definition msg)))) (def ^:private rename-file-or-dir (delay - (require-and-resolve 'refactor-nrepl.rename-file-or-dir/rename-file-or-dir))) + (require-and-resolve 'refactor-nrepl.rename-file-or-dir/rename-file-or-dir))) (defn- rename-file-or-dir-reply [{:keys [transport old-path new-path ignore-errors] :as msg}] (reply transport msg :touched (@rename-file-or-dir old-path new-path (= ignore-errors "true")) @@ -195,7 +195,7 @@ (def namespace-aliases (delay - (require-and-resolve 'refactor-nrepl.ns.libspecs/namespace-aliases-response))) + (require-and-resolve 'refactor-nrepl.ns.libspecs/namespace-aliases-response))) (defn- namespace-aliases-reply [{:keys [transport] :as msg}] (let [aliases (@namespace-aliases msg)] @@ -205,7 +205,7 @@ (def suggest-libspecs (delay - (require-and-resolve 'refactor-nrepl.ns.suggest-libspecs/suggest-libspecs-response))) + (require-and-resolve 'refactor-nrepl.ns.suggest-libspecs/suggest-libspecs-response))) (defn- suggest-libspecs-reply [{:keys [transport] :as msg}] (reply transport diff --git a/src/refactor_nrepl/s_expressions.clj b/src/refactor_nrepl/s_expressions.clj index 2ae6bad6..eb8ccae9 100644 --- a/src/refactor_nrepl/s_expressions.clj +++ b/src/refactor_nrepl/s_expressions.clj @@ -22,7 +22,7 @@ (let [^IndexingPushbackReader reader (zip-reader/string-reader file-content)] (loop [sexp (zip-parser/parse reader)] - (let [zloc (zip/edn sexp)] + (let [zloc (zip/of-node sexp)] (if (and zloc (not (comment-or-string-or-uneval-or-nil? zloc))) (zip/string zloc) (when (.peek-char reader) diff --git a/test/refactor_nrepl/ns/class_search_test.clj b/test/refactor_nrepl/ns/class_search_test.clj index 599bb71b..1f6e98ab 100644 --- a/test/refactor_nrepl/ns/class_search_test.clj +++ b/test/refactor_nrepl/ns/class_search_test.clj @@ -30,11 +30,12 @@ "jdk." ;; Odd stuff brought in by the `fs` dependency: "Implementing class" - "org.apache.commons.compress.harmony.pack200.Segment can not implement"]) + "org.apache.commons.compress.harmony.pack200.Segment can not implement" + "javax/xml/bind/ModuleUtil (wrong name: META-INF/versions/9/javax/xml/bind/ModuleUtil)"]) (do (.printStackTrace e) false)) - (-> e (.getMessage))) + (-> e .getMessage pr-str)) e) (defn resolve-class [sym] diff --git a/test/refactor_nrepl/rename_file_or_dir_test.clj b/test/refactor_nrepl/rename_file_or_dir_test.clj index 0dfbce9f..abb1330c 100644 --- a/test/refactor_nrepl/rename_file_or_dir_test.clj +++ b/test/refactor_nrepl/rename_file_or_dir_test.clj @@ -28,8 +28,11 @@ refactor-nrepl.rename-file-or-dir/update-dependents! (fn [_dependents]) refactor-nrepl.rename-file-or-dir/file-or-symlink-exists? (constantly true)] (let [res (sut/rename-file-or-dir from-file-path to-file-path ignore-errors?)] - (is (or (list? res) (instance? clojure.lang.Cons res))) - (is (= 4 (count res))))));; currently not tracking :require-macros!! + (is (or (list? res) + (instance? clojure.lang.Cons res)) + (pr-str [pr-str res, (class res)])) + (is (= 4 (count res)) + (pr-str res)))));; currently not tracking :require-macros!! (deftest replaces-ns-references-in-dependents (let [dependents (atom [])]