Skip to content

Commit

Permalink
maint: bump internal deps for build and test (#237)
Browse files Browse the repository at this point in the history
* maint: bump internal deps for build and test

Of note:
- Bumping Graal meant tweaking scripts and yml CI as GraalVM has changed
their versioning scheme to track the JDK version. Only testing against
Community Edition at this time.
- While tweaking scripts noticed that babashka/fs can now replace my script
helper.fs ns, so turfed it.
- Also bumped sci via sci-test

* yaml typo
  • Loading branch information
lread authored Jun 29, 2023
1 parent fe3d880 commit a8c298c
Show file tree
Hide file tree
Showing 15 changed files with 113 additions and 145 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/native-image-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
fail-fast: false
matrix:
os: [ windows, ubuntu, macos ]
graal-java: [ '11', '17' ]
java-version: [ '17.0.7', '20.0.1' ]
test: [ test-native, test-native-sci ]
clojure-version: [ '1.11' ]

Expand All @@ -35,9 +35,8 @@ jobs:
- name: Install GraalVM
uses: graalvm/setup-graalvm@v1
with:
version: '22.3.2'
java-version: ${{ matrix.graal-java }}
components: 'native-image'
java-version: ${{ matrix.java-version }}
distribution: 'graalvm-community'
github-token: ${{ secrets.GITHUB_TOKEN }}

#
Expand Down
2 changes: 1 addition & 1 deletion bb.edn
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{:min-bb-version "0.9.162"
:paths ["script" "build"]
:deps {org.clojure/data.zip {:mvn/version "1.0.0"}
io.aviso/pretty {:mvn/version "1.4.2"}
io.aviso/pretty {:mvn/version "1.4.4"}
dev.nubank/docopt {:mvn/version "0.6.1-fix7"}
doric/doric {:mvn/version "0.9.0"}
version-clj/version-clj {:mvn/version "2.0.2"}
Expand Down
12 changes: 6 additions & 6 deletions deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
;;
:lint-cache {:replace-paths ["src"]} ;; when building classpath we want to exclude resources
;; so we do not pick up our own clj-kondo config exports
:clj-kondo {:extra-deps {clj-kondo/clj-kondo {:mvn/version "2023.04.14"}}
:clj-kondo {:extra-deps {clj-kondo/clj-kondo {:mvn/version "2023.05.26"}}
:override-deps {org.clojure/clojure {:mvn/version "1.11.1"}}
:main-opts ["-m" "clj-kondo.main"]}

Expand Down Expand Up @@ -65,7 +65,7 @@
:extra-paths ["target/test-doc-blocks/test"]}

;; kaocha for testing clojure versions>= v1.9
:kaocha {:extra-deps {lambdaisland/kaocha {:mvn/version "1.83.1314"}
:kaocha {:extra-deps {lambdaisland/kaocha {:mvn/version "1.85.1342"}
lambdaisland/kaocha-junit-xml {:mvn/version "1.17.101"}
lambdaisland/kaocha-cloverage {:mvn/version "1.1.89"}}
:main-opts ["-m" "kaocha.runner"]}
Expand Down Expand Up @@ -99,7 +99,7 @@

:apply-import-vars {:override-deps {org.clojure/clojure {:mvn/version "1.11.1"}}
:extra-deps {metosin/malli {:mvn/version "0.11.0"}
io.aviso/pretty {:mvn/version "1.4.2"}}
io.aviso/pretty {:mvn/version "1.4.4"}}
:ns-default lread.apply-import-vars}

;;
Expand All @@ -113,8 +113,8 @@
:extra-deps {com.github.clj-easy/graal-build-time {:mvn/version "0.1.4"}}}

:sci-test {:extra-paths ["target/generated/sci-test/src"]
:extra-deps {lread/sci-test {:git/url "https://github.com/lread/sci-test.git"
:sha "804c72830f09fc16b2f1b38f4b7af7e90b7ec919"}}}
:extra-deps {lread/sci-test_{:git/url "https://github.com/lread/sci-test.git"
:sha "78e098353d5cce878b8aec1767ae290a3d2fcee9"}}}

:native-test {:extra-paths ["target/generated/graal"]}

Expand All @@ -140,7 +140,7 @@
;;
;; Maintenance support
;;
:outdated {:extra-deps {com.github.liquidz/antq {:mvn/version "2.4.1070"}
:outdated {:extra-deps {com.github.liquidz/antq {:mvn/version "2.5.1095"}
org.slf4j/slf4j-simple {:mvn/version "2.0.7"} ;; to rid ourselves of logger warnings
}
:override-deps {org.clojure/clojure {:mvn/version "1.11.1"}}
Expand Down
5 changes: 3 additions & 2 deletions doc/02-developer-guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ We make use of planck for cljs bootstrap (aka cljs self-hosted) testing.
Planck is currently not available for Windows.

We test that rewrite-clj operates as expected when natively compile via GraalVM.
Automated testing is setup using GraalVM v22 JDK11.
Automated testing is setup using GraalVM JDK 17 and JDK 20.
At this time we only test against the Community Edition.

== Prerequisites
* Java JDK 1.8 or above (shadow-cljs tests require min of JDK 11)
* NodeJs v12 or above
* Clojure v1.10.1.697 or above for `clojure` command
** Note that rewrite-clj v1 itself supports Clojure v1.8 and above
* Babashka v0.3.7 or above
* GraalVM v22.3.2 JDK 11 or 17 (if you want to run GraalVM native image tests)
* Current release of GraalVM JDK 17 or 20, if you want to run GraalVM native image tests

=== Windows Notes

Expand Down
77 changes: 31 additions & 46 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"karma-cljs-test": "^0.1.0",
"karma-junit-reporter": "^2.0.0",
"karma-spec-reporter": "^0.0.36",
"shadow-cljs": "^2.23.3"
"shadow-cljs": "^2.24.0"
}
}
6 changes: 3 additions & 3 deletions script/ci_unit_tests.clj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env bb

(ns ci-unit-tests
(:require [cheshire.core :as json]
(:require [babashka.fs :as fs]
[cheshire.core :as json]
[clojure.string :as string]
[doric.core :as doric]
[helper.fs :as fs]
[helper.jdk :as jdk]
[helper.main :as main]
[helper.os :as os]
Expand Down Expand Up @@ -75,7 +75,7 @@

(defn- clean []
(doseq [dir ["target" ".cpcache" ".shadow-cljs"]]
(fs/delete-file-recursively dir true)))
(fs/delete-tree dir)))

(def args-usage "Valid args:
[matrix-for-ci [--format=json]]
Expand Down
6 changes: 3 additions & 3 deletions script/cljdoc_preview.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

(ns cljdoc-preview
(:require [babashka.curl :as curl]
[babashka.fs :as fs]
[build-shared]
[clojure.java.browse :as browse]
[clojure.string :as string]
[helper.fs :as fs]
[helper.main :as main]
[helper.shell :as shell]
[lread.status-line :as status]))
Expand All @@ -25,7 +25,7 @@
;;

(defn check-prerequisites []
(let [missing-cmds (doall (remove fs/on-path ["git" "docker"]))]
(let [missing-cmds (doall (remove fs/which ["git" "docker"]))]
(when (seq missing-cmds)
(status/die 1 (string/join "\n" ["Required commands not found:"
(string/join "\n" missing-cmds)])))))
Expand Down Expand Up @@ -201,7 +201,7 @@
(status/line :warn (string/join "\n" warnings)))))

(defn cleanup-resources []
(fs/delete-file-recursively cljdoc-db-dir true))
(fs/delete-tree cljdoc-db-dir))

(def args-usage "Valid args: (start|ingest|view|stop|status|--help)
Expand Down
8 changes: 4 additions & 4 deletions script/doc_api_diffs.clj
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env bb

(ns doc-api-diffs
(:require [clojure.java.io :as io]
(:require [babashka.fs :as fs]
[clojure.java.io :as io]
[clojure.string :as string]
[helper.fs :as fs]
[helper.main :as main]
[helper.shell :as shell]
[lread.status-line :as status]))
Expand All @@ -21,12 +21,12 @@
#(string/starts-with? (str (.getName %)) proj-cache-prefix)
(.listFiles cache-dir))))]
(println "- removing " proj-cache-dir)
(fs/delete-file-recursively proj-cache-dir true))))
(fs/delete-tree proj-cache-dir))))

(defn clean [{:keys [:report-dir]} rewrite-clj-v1-coords]
(status/line :head "Clean")
(status/line :detail "- report dir")
(fs/delete-file-recursively report-dir true)
(fs/delete-tree report-dir)
(.mkdirs (io/file report-dir))
(status/line :detail "- cached metdata for rewrite-clj v1 (because that's the thing that is changing, right?)")
(wipe-rewrite-clj-diff-cache rewrite-clj-v1-coords)
Expand Down
25 changes: 0 additions & 25 deletions script/helper/fs.clj

This file was deleted.

Loading

0 comments on commit a8c298c

Please sign in to comment.