From a13930cdef52ffa2cf301d917be35177a5f11943 Mon Sep 17 00:00:00 2001 From: lread Date: Fri, 23 Feb 2024 12:17:28 -0500 Subject: [PATCH 1/2] ci: fix downloading deps for windows The `download-deps` bb task creates a basis for each deps.edn alias in-process to efficiently download all deps (work is done in build.clj). Because the `:build` alias also included `deps-deploy` its many deps were brought in. This seems to somehow mess up bringing down conflicting(?) deps for other aliases, at least for Windows. I've separated out `deps-deploy` to `:deploy` from `:build` alias to try to avoid the issue. Also: switched to `clojure.tools.build.api/create-basis`, was using `clojure.tools.deps/create-basis`; no need to use deps ns when build api exposes this fn. Also: was depending on stale `org.clojure/tools.build` maven dep, switched to current `io.github.clojure/tools.build` dep and updated to current version. Closes #252 --- build.clj | 7 +++---- deps.edn | 7 +++++-- script/ci_publish.clj | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/build.clj b/build.clj index 14e69be..4959b70 100644 --- a/build.clj +++ b/build.clj @@ -1,8 +1,7 @@ (ns build (:require [build-shared] [clojure.edn :as edn] - [clojure.tools.build.api :as b] - [clojure.tools.deps :as deps])) + [clojure.tools.build.api :as b])) (def version (build-shared/lib-version)) (def lib (build-shared/lib-artifact-name)) @@ -61,7 +60,7 @@ keys)] ;; one at a time because aliases with :replace-deps will... well... you know. (println "Bring down default deps") - (deps/create-basis {}) + (b/create-basis {}) (doseq [a (sort aliases)] (println "Bring down deps for alias" a) - (deps/create-basis {:aliases [a]})))) + (b/create-basis {:aliases [a]})))) diff --git a/deps.edn b/deps.edn index 2a70d94..07a1ddf 100644 --- a/deps.edn +++ b/deps.edn @@ -136,11 +136,14 @@ ;; ;; Deployment ;; - :build {:deps {org.clojure/tools.build {:mvn/version "0.9.2"} - slipset/deps-deploy {:mvn/version "0.2.2"}} + :build {:deps {io.github.clojure/tools.build {:mvn/version "0.9.6"}} :extra-paths ["src" "build"] :ns-default build} + ;; keep deploy deps separate from build deps; this avoids `bb download-deps` failures on windows + ;; when downloading jackson (and other conflicting) deps. + :deploy {:extra-deps {slipset/deps-deploy {:mvn/version "0.2.2"}}} + ;; ;; Maintenance support ;; diff --git a/script/ci_publish.clj b/script/ci_publish.clj index 95366ca..56922c3 100644 --- a/script/ci_publish.clj +++ b/script/ci_publish.clj @@ -41,7 +41,7 @@ (defn clojars-deploy [] (assert-on-ci) (analyze-ci-tag) ;; fail on unexpected version tag - (t/shell "clojure -T:build deploy")) + (t/shell "clojure -T:build:deploy deploy")) (defn github-create-release [] (assert-on-ci) From 54cfbe4b1b87c2a4e5633b202a3ed3cbb5b7ed04 Mon Sep 17 00:00:00 2001 From: lread Date: Fri, 23 Feb 2024 12:43:07 -0500 Subject: [PATCH 2/2] ci: bump setup-clojure This should fix GitHub API rate limit errors. --- .github/workflows/libs-test.yml | 2 +- .github/workflows/shared-setup/action.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/libs-test.yml b/.github/workflows/libs-test.yml index 927d3a9..a8d3bdb 100644 --- a/.github/workflows/libs-test.yml +++ b/.github/workflows/libs-test.yml @@ -55,7 +55,7 @@ jobs: ## instead of using lein bundled with github actions image. ## Upcoming 2.11.2 might fix, can optionally revisit in the future. - name: Install Lein - uses: DeLaGuardo/setup-clojure@12.4 + uses: DeLaGuardo/setup-clojure@12.5 with: lein: 2.10.0 diff --git a/.github/workflows/shared-setup/action.yml b/.github/workflows/shared-setup/action.yml index 9746402..b6e0b13 100644 --- a/.github/workflows/shared-setup/action.yml +++ b/.github/workflows/shared-setup/action.yml @@ -40,7 +40,7 @@ runs: if: inputs.jdk != 'skip' - name: Install Babashka - uses: DeLaGuardo/setup-clojure@12.4 + uses: DeLaGuardo/setup-clojure@12.5 with: bb: 'latest' @@ -54,7 +54,7 @@ runs: if: runner.os == 'Windows' - name: Install Clojure (macos, linux) - uses: DeLaGuardo/setup-clojure@12.4 + uses: DeLaGuardo/setup-clojure@12.5 with: cli: 'latest' if: runner.os != 'Windows'