From 486d80ae01059f91db35dfd10e937f2bf12242a9 Mon Sep 17 00:00:00 2001 From: Lee Read Date: Sun, 17 Mar 2024 12:54:44 -0400 Subject: [PATCH] maint: bump deps to current (#564) Of note: - address new clj-kondo findings (dynamic tests vars were uninitialized). --- .clj-kondo/http-kit/http-kit/config.edn | 3 ++ .../http-kit/httpkit/with_channel.clj | 16 +++++++ .github/workflows/release.yml | 8 ++-- .github/workflows/test.yml | 16 +++---- deps.edn | 44 ++++++++++--------- test/etaoin/api_test.clj | 2 +- test/etaoin/ide_test.clj | 6 +-- test/etaoin/test_report.clj | 4 +- 8 files changed, 61 insertions(+), 38 deletions(-) create mode 100644 .clj-kondo/http-kit/http-kit/config.edn create mode 100644 .clj-kondo/http-kit/http-kit/httpkit/with_channel.clj diff --git a/.clj-kondo/http-kit/http-kit/config.edn b/.clj-kondo/http-kit/http-kit/config.edn new file mode 100644 index 00000000..e9dbcd8a --- /dev/null +++ b/.clj-kondo/http-kit/http-kit/config.edn @@ -0,0 +1,3 @@ + +{:hooks + {:analyze-call {org.httpkit.server/with-channel httpkit.with-channel/with-channel}}} diff --git a/.clj-kondo/http-kit/http-kit/httpkit/with_channel.clj b/.clj-kondo/http-kit/http-kit/httpkit/with_channel.clj new file mode 100644 index 00000000..b429de89 --- /dev/null +++ b/.clj-kondo/http-kit/http-kit/httpkit/with_channel.clj @@ -0,0 +1,16 @@ +(ns httpkit.with-channel + (:require [clj-kondo.hooks-api :as api])) + +(defn with-channel [{node :node}] + (let [[request channel & body] (rest (:children node))] + (when-not (and request channel) (throw (ex-info "No request or channel provided" {}))) + (when-not (api/token-node? channel) (throw (ex-info "Missing channel argument" {}))) + (let [new-node + (api/list-node + (list* + (api/token-node 'let) + (api/vector-node [channel (api/vector-node [])]) + request + body))] + + {:node new-node}))) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e6c458ab..33826326 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,7 +13,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -21,7 +21,7 @@ jobs: uses: fregante/setup-git-user@v2.0.1 - name: Clojure deps cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.m2/repository @@ -31,13 +31,13 @@ jobs: restore-keys: cljdeps- - name: Setup Java - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: '11' - name: Install Clojure Tools - uses: DeLaGuardo/setup-clojure@10.3 + uses: DeLaGuardo/setup-clojure@12.5 with: bb: 'latest' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0e178023..782e3a14 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,10 +10,10 @@ jobs: tests: ${{ steps.set-tests.outputs.tests }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Clojure deps cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.m2/repository @@ -23,13 +23,13 @@ jobs: restore-keys: cljdeps- - name: "Setup Java" - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: '11' - name: Install Clojure Tools - uses: DeLaGuardo/setup-clojure@10.3 + uses: DeLaGuardo/setup-clojure@12.5 with: bb: 'latest' @@ -71,10 +71,10 @@ jobs: if: ${{ matrix.os == 'ubuntu' }} run: sudo apt-get -y install fluxbox - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Clojure deps cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.m2/repository @@ -84,13 +84,13 @@ jobs: restore-keys: cljdeps- - name: Setup Java - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: '11' - name: Install Clojure Tools - uses: DeLaGuardo/setup-clojure@10.3 + uses: DeLaGuardo/setup-clojure@12.5 with: bb: 'latest' diff --git a/deps.edn b/deps.edn index 8dcff939..7a787607 100644 --- a/deps.edn +++ b/deps.edn @@ -1,22 +1,23 @@ {:paths ["src" "resources"] :deps {org.clojure/clojure {:mvn/version "1.9.0"} ;; min clojure version - babashka/fs {:mvn/version "0.3.17"} - babashka/process {:mvn/version "0.4.16"} + babashka/fs {:mvn/version "0.5.20"} + babashka/process {:mvn/version "0.5.22"} clj-http/clj-http {:mvn/version "3.12.3"} ;; for jvm use org.clj-commons/clj-http-lite {:mvn/version "1.0.13"} ;; for babashka use slingshot/slingshot {:mvn/version "0.12.2"} - cheshire/cheshire {:mvn/version "5.11.0"} - org.clojure/tools.cli {:mvn/version "1.0.214"} - org.clojure/tools.logging {:mvn/version "1.2.4"}} + cheshire/cheshire {:mvn/version "5.12.0"} + org.clojure/tools.cli {:mvn/version "1.1.230"} + org.clojure/tools.logging {:mvn/version "1.3.0"}} :aliases - {:1.11 {:replace-deps {org.clojure/clojure {:mvn/version "1.11.1"}}} + {:1.11 {:replace-deps {org.clojure/clojure {:mvn/version "1.11.2"}}} + :1.12 {:replace-deps {org.clojure/clojure {:mvn/version "1.12.0-alpha9"}}} :debug {:extra-paths ["env/dev/resources"]} :test {:extra-paths ["test" "env/test/resources"] :extra-deps {io.github.cognitect-labs/test-runner {:git/tag "v0.5.1" :git/sha "dfb30dd"} - org.babashka/cli {:mvn/version "0.7.51"} - ch.qos.logback/logback-classic {:mvn/version "1.4.7"} + org.babashka/cli {:mvn/version "0.8.58"} + ch.qos.logback/logback-classic {:mvn/version "1.3.14"} ;; for http-client which uses apache http client 4.x which uses commons logging - org.slf4j/jcl-over-slf4j {:mvn/version "2.0.7"}} + org.slf4j/jcl-over-slf4j {:mvn/version "2.0.12"}} :exec-fn cognitect.test-runner.api/test :org.babashka/cli {:coerce {:nses [:symbol] :patterns [:string] @@ -25,7 +26,7 @@ :script {:extra-paths ["script"]} ;; test-doc-blocks - gen tests - :test-doc-blocks {:replace-deps {org.clojure/clojure {:mvn/version "1.11.1"} + :test-doc-blocks {:replace-deps {org.clojure/clojure {:mvn/version "1.11.2"} com.github.lread/test-doc-blocks {:mvn/version "1.0.166-alpha"}} :replace-paths [] :ns-default lread.test-doc-blocks @@ -33,7 +34,7 @@ ;; test-doc-blocks - run tests ;; usage: test:test-docs - :test-docs {:override-deps {org.clojure/clojure {:mvn/version "1.11.1"}} + :test-docs {:override-deps {org.clojure/clojure {:mvn/version "1.11.2"}} :extra-paths ["target/test-doc-blocks/test"] :exec-fn cognitect.test-runner.api/test :exec-args {:dirs ["target/test-doc-blocks/test"]} @@ -43,23 +44,26 @@ :main-opts ["-m" "babashka.cli.exec"]} ;; for consistent linting we use a specific version of clj-kondo through the jvm - :clj-kondo {:extra-deps {clj-kondo/clj-kondo {:mvn/version "2023.04.14"}} + :clj-kondo {:extra-deps {clj-kondo/clj-kondo {:mvn/version "2024.03.13"}} :main-opts ["-m" "clj-kondo.main"]} - :build {:deps {io.github.clojure/tools.build {:mvn/version "0.9.4"} - slipset/deps-deploy {:mvn/version "0.2.1"}} + :build {:deps {io.github.clojure/tools.build {:mvn/version "0.10.0"} + slipset/deps-deploy {:mvn/version "0.2.2"}} :ns-default build} - :outdated {:extra-deps {com.github.liquidz/antq {:mvn/version "2.3.1043"} + :outdated {:extra-deps {com.github.liquidz/antq {:mvn/version "2.8.1185"} org.clojure/clojure {:mvn/version "1.11.1"} - org.slf4j/slf4j-simple {:mvn/version "2.0.7"} ;; to rid ourselves of logger warnings + org.slf4j/slf4j-simple {:mvn/version "2.0.12"} ;; to rid ourselves of logger warnings } - :main-opts ["-m" "antq.core"]} + :main-opts ["-m" "antq.core" + "--exclude=ch.qos.logback/logback-classic@1.4.x" ;; requires min jdk 11, we are currently jdk8 compatible + "--exclude=ch.qos.logback/logback-classic@1.5.x" ;; requires min jdk 11, we are currently jdk8 compatible + ]} :repl/cider - {:extra-deps {nrepl/nrepl {:mvn/version "1.0.0"} - cider/cider-nrepl {:mvn/version "0.30.0"} - refactor-nrepl/refactor-nrepl {:mvn/version "3.6.0"}} + {:extra-deps {nrepl/nrepl {:mvn/version "1.1.1"} + cider/cider-nrepl {:mvn/version "0.47.0"} + refactor-nrepl/refactor-nrepl {:mvn/version "3.10.0"}} :jvm-opts ["-XX:-OmitStackTraceInFastThrow"] :main-opts ["-m" "nrepl.cmdline" "--middleware" "[refactor-nrepl.middleware/wrap-refactor,cider.nrepl/cider-middleware]" diff --git a/test/etaoin/api_test.clj b/test/etaoin/api_test.clj index ea9d735f..f8d0ead4 100644 --- a/test/etaoin/api_test.clj +++ b/test/etaoin/api_test.clj @@ -50,7 +50,7 @@ (get-drivers-from-prop) (get-default-drivers))) -(def ^:dynamic *driver*) +(def ^:dynamic *driver* nil) (defn- find-available-port [] (with-open [sock (ServerSocket. 0)] diff --git a/test/etaoin/ide_test.clj b/test/etaoin/ide_test.clj index 4a3a1595..6ac6393e 100644 --- a/test/etaoin/ide_test.clj +++ b/test/etaoin/ide_test.clj @@ -7,9 +7,9 @@ [etaoin.ide.flow :as ide] [etaoin.test-report :as test-report])) -(def ^:dynamic *driver*) -(def ^:dynamic *base-url*) -(def ^:dynamic *test-file-path*) +(def ^:dynamic *driver* nil) +(def ^:dynamic *base-url* nil) +(def ^:dynamic *test-file-path* nil) (defn get-default-drivers "Default and supported drivers for ide tests" diff --git a/test/etaoin/test_report.clj b/test/etaoin/test_report.clj index 1c909b33..183cbf6c 100644 --- a/test/etaoin/test_report.clj +++ b/test/etaoin/test_report.clj @@ -1,13 +1,13 @@ (ns etaoin.test-report (:require [clojure.test])) -(def ^:dynamic *context*) +(def ^:dynamic *context* nil) (def platform (if (System/getProperty "babashka.version") "bb" "jvm")) (defmethod clojure.test/report :begin-test-var [m] (let [test-name (-> m :var meta :name)] - (if (bound? #'*context*) + (if *context* (println (format "=== %s [%s][%s]" test-name platform *context*)) (println (format "=== %s [%s]" test-name platform)))))