Skip to content

Commit b8a4804

Browse files
authored
test & ci: bump deps (#322)
Of note: - codecov action renamed arg file->files - setup-clojure action now installs via clj-msi on Windows (woot!) - new version of kondo; it found a couple of redundant nested calls (fixed)! - bump lib tests libs - add jdk23 to ci testing
1 parent 9a6bc04 commit b8a4804

File tree

14 files changed

+144
-116
lines changed

14 files changed

+144
-116
lines changed

.clj-kondo/taoensso/encore/config.edn

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
{:hooks {:analyze-call {taoensso.encore/defalias taoensso.encore/defalias}}}
1+
{:hooks
2+
{:analyze-call
3+
{taoensso.encore/defalias taoensso.encore/defalias
4+
taoensso.encore/defn-cached taoensso.encore/defn-cached
5+
taoensso.encore/defonce taoensso.encore/defonce}}}
Lines changed: 46 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,51 @@
11
(ns taoensso.encore
2+
"I don't personally use clj-kondo, so these hooks are
3+
kindly authored and maintained by contributors.
4+
PRs very welcome! - Peter Taoussanis"
5+
(:refer-clojure :exclude [defonce])
26
(:require
37
[clj-kondo.hooks-api :as hooks]))
48

5-
(defn defalias [{:keys [node]}]
9+
(defn defalias
10+
[{:keys [node]}]
611
(let [[sym-raw src-raw] (rest (:children node))
7-
src (if src-raw src-raw sym-raw)
8-
sym (if src-raw
9-
sym-raw
10-
(symbol (name (hooks/sexpr src))))]
11-
{:node (with-meta
12-
(hooks/list-node
13-
[(hooks/token-node 'def)
14-
(hooks/token-node (hooks/sexpr sym))
15-
(hooks/token-node (hooks/sexpr src))])
16-
(meta src))}))
12+
src (or src-raw sym-raw)
13+
sym (if src-raw sym-raw (symbol (name (hooks/sexpr src))))]
14+
{:node
15+
(with-meta
16+
(hooks/list-node
17+
[(hooks/token-node 'def)
18+
(hooks/token-node (hooks/sexpr sym))
19+
(hooks/token-node (hooks/sexpr src))])
20+
(meta src))}))
21+
22+
(defn defn-cached
23+
[{:keys [node]}]
24+
(let [[sym _opts binding-vec & body] (rest (:children node))]
25+
{:node
26+
(hooks/list-node
27+
(list
28+
(hooks/token-node 'def)
29+
sym
30+
(hooks/list-node
31+
(list*
32+
(hooks/token-node 'fn)
33+
binding-vec
34+
body))))}))
35+
36+
(defn defonce
37+
[{:keys [node]}]
38+
;; args = [sym doc-string? attr-map? init-expr]
39+
(let [[sym & args] (rest (:children node))
40+
[doc-string args] (if (and (hooks/string-node? (first args)) (next args)) [(hooks/sexpr (first args)) (next args)] [nil args])
41+
[attr-map init-expr] (if (and (hooks/map-node? (first args)) (next args)) [(hooks/sexpr (first args)) (fnext args)] [nil (first args)])
42+
43+
attr-map (if doc-string (assoc attr-map :doc doc-string) attr-map)
44+
sym+meta (if attr-map (with-meta sym attr-map) sym)
45+
rewritten
46+
(hooks/list-node
47+
[(hooks/token-node 'clojure.core/defonce)
48+
sym+meta
49+
init-expr])]
50+
51+
{:node rewritten}))

.github/workflows/code-coverage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ jobs:
2020
run: bb test-coverage
2121

2222
- name: Upload Code Coverage Results
23-
uses: codecov/codecov-action@v4
23+
uses: codecov/codecov-action@v5
2424
with:
2525
fail_ci_if_error: true # optional (default = false)
26-
file: ./target/coverage/codecov.json
26+
files: ./target/coverage/codecov.json
2727
token: ${{ secrets.CODECOV_TOKEN }} # required
2828
verbose: true # optional (default = false)

.github/workflows/libs-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
## instead of using lein bundled with github actions image.
5656
## Upcoming 2.11.2 might fix, can optionally revisit in the future.
5757
- name: Install Lein
58-
uses: DeLaGuardo/setup-clojure@12.5
58+
uses: DeLaGuardo/setup-clojure@13.0
5959
with:
6060
lein: 2.10.0
6161

.github/workflows/native-image-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
os: [ windows, ubuntu, macos ]
20-
java-version: [ '23' ]
20+
java-version: [ '23.0.1' ]
2121
test: [ native, native-sci ]
2222
clojure-version: [ '1.12' ]
2323

.github/workflows/shared-setup/action.yml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -39,25 +39,11 @@ runs:
3939
java-version: ${{ inputs.jdk }}
4040
if: inputs.jdk != 'skip'
4141

42-
- name: Install Babashka
43-
uses: DeLaGuardo/setup-clojure@12.5
42+
- name: Install Babashka & Clojure
43+
uses: DeLaGuardo/setup-clojure@13.0
4444
with:
4545
bb: 'latest'
46-
47-
- name: Install Clojure (windows)
48-
# On windows, deps.clj's deps.exe is used in place of clojure to avoid complexities of official clojure install
49-
shell: ${{ inputs.shell }}
50-
run: |
51-
PowerShell -Command "iwr -useb https://raw.githubusercontent.com/borkdude/deps.clj/master/install.ps1 | iex"
52-
Rename-Item $HOME\deps.clj\deps.exe clojure.exe
53-
echo "$HOME\deps.clj" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
54-
if: runner.os == 'Windows'
55-
56-
- name: Install Clojure (macos, linux)
57-
uses: DeLaGuardo/[email protected]
58-
with:
5946
cli: 'latest'
60-
if: runner.os != 'Windows'
6147

6248
- name: Tools Versions
6349
shell: ${{ inputs.shell }}

bb.edn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
lread/status-line {:git/url "https://github.com/lread/status-line.git"
99
:sha "cf44c15f30ea3867227fa61ceb823e5e942c707f"}
1010
etaoin/etaoin {:mvn/version "1.1.42"}
11-
io.github.babashka/neil {:git/tag "v0.3.67" :git/sha "054ca51"}}
11+
io.github.babashka/neil {:git/tag "v0.3.68", :git/sha "78ffab1"} }
1212
:tasks {;; setup
1313
:requires ([clojure.string :as string]
1414
[lread.status-line :as status])

deps.edn

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
;;
5151
:lint-cache {:replace-paths ["src"]} ;; when building classpath we want to exclude resources
5252
;; so we do not pick up our own clj-kondo config exports
53-
:clj-kondo {:extra-deps {clj-kondo/clj-kondo {:mvn/version "2024.09.27"}}
53+
:clj-kondo {:extra-deps {clj-kondo/clj-kondo {:mvn/version "2024.11.14"}}
5454
:override-deps {org.clojure/clojure {:mvn/version "1.12.0"}}
5555
:main-opts ["-m" "clj-kondo.main"]}
5656

@@ -158,7 +158,7 @@
158158
;;
159159
;; Maintenance support
160160
;;
161-
:outdated {:extra-deps {com.github.liquidz/antq {:mvn/version "2.9.1232"}
161+
:outdated {:extra-deps {com.github.liquidz/antq {:mvn/version "2.11.1250"}
162162
org.slf4j/slf4j-simple {:mvn/version "2.0.16"} ;; to rid ourselves of logger warnings
163163
}
164164
:override-deps {org.clojure/clojure {:mvn/version "1.12.0"}}

doc/02-developer-guide.adoc

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,8 @@ https://scoop.sh/[Scoop] offers an easy way to install tools.
4242
@littleli is doing a great job w/maintaining https://github.com/littleli/scoop-clojure[scoop apps for Clojure, Babashka and other tools] and this is how I installed Babashka.
4343

4444
==== Clojure
45-
We all choose our own paths, but for me, using https://github.com/borkdude/deps.clj[deps.clj] instead of https://github.com/clojure/tools.deps.alpha/wiki/clj-on-Windows[Clojure's PowerShell Module] offered me no fuss no muss Clojure on Windows and GitHub Actions on Windows.
46-
I decided to install deps.clj not through scoop but through https://github.com/borkdude/deps.clj#windows[the deps.clj `install.ps1` script].
47-
This makes it simple to treat `deps.exe` as if it were the official `clojure` via a simple rename:
48-
49-
----
50-
Rename-Item $HOME\deps.clj\deps.exe clojure.exe
51-
----
45+
Now that the Clojure core team is recommends https://github.com/casselc/clj-msi[clj-msi] life is easier.
46+
If you are not already installing via `clj-msi` on Windows, you'll want to do so.
5247

5348
==== GraalVM
5449
You'll have your own preference, but I find it convenient to install GraalVM on Windows via scoop.

0 commit comments

Comments
 (0)