Skip to content

Commit

Permalink
Update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
dotemacs authored and vemv committed Jul 10, 2023
1 parent 3bda039 commit 0b649cd
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 42 deletions.
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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

Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: inline-deps test deploy clean

VERSION ?= 1.10
VERSION ?= 1.11

clean:
lein clean
Expand Down
41 changes: 20 additions & 21 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -34,33 +34,32 @@
: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"]
:resource-paths ["test-resources"
"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]]
Expand All @@ -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]
Expand Down
20 changes: 10 additions & 10 deletions src/refactor_nrepl/middleware.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down Expand Up @@ -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))
Expand All @@ -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
Expand All @@ -180,22 +180,22 @@

(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"))
:status :done))

(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)]
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/refactor_nrepl/s_expressions.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions test/refactor_nrepl/ns/class_search_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
7 changes: 5 additions & 2 deletions test/refactor_nrepl/rename_file_or_dir_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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 [])]
Expand Down

0 comments on commit 0b649cd

Please sign in to comment.