diff --git a/CHANGELOG.md b/CHANGELOG.md index 21e0631..04b27e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changes +* 2.7.next in progress + * Drop support for Clojure 1.9 [#561](https://github.com/seancorfield/honeysql/issues/561). + * 2.6.1281 -- 2025-03-06 * Address [#568](https://github.com/seancorfield/honeysql/issues/568) by adding `honey.sql/semicolon` to merge multiple SQL+params vectors into one (with semicolons separating the SQL statements). * Address [#567](https://github.com/seancorfield/honeysql/issues/567) by adding support for `ASSERT` clause. diff --git a/README.md b/README.md index 139c754..724e6d3 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,8 @@ This project follows the version scheme MAJOR.MINOR.COMMITS where MAJOR and MINO > Note: every commit to the **develop** branch runs CI (GitHub Actions) and successful runs push a MAJOR.MINOR.9999-SNAPSHOT build to Clojars so the very latest version of HoneySQL is always available either via that [snapshot on Clojars](https://clojars.org/com.github.seancorfield/honeysql) or via a git dependency on the latest SHA. -HoneySQL 2.x requires Clojure 1.9 or later. +HoneySQL 2.7.x requires Clojure 1.10.3 or later. +Earlier versions of HoneySQL support Clojure 1.9.0. It also supports recent versions of ClojureScript and Babashka. Compared to the [legacy 1.x version](#1.x), HoneySQL 2.x provides a streamlined codebase and a simpler method for extending the DSL. It also supports SQL dialects out-of-the-box and will be extended to support vendor-specific language features over time (unlike 1.x). diff --git a/build.clj b/build.clj index c8c6f89..3546b3a 100644 --- a/build.clj +++ b/build.clj @@ -47,8 +47,7 @@ "Generate and run doc tests. Optionally specify :aliases vector: - [:1.9] -- test against Clojure 1.9 (the default) - [:1.10] -- test against Clojure 1.10.3 + [:1.10] -- test against Clojure 1.10.3 (the default) [:1.11] -- test against Clojure 1.11.0 [:1.12] -- test against Clojure 1.12.0 [:cljs] -- test against ClojureScript" @@ -99,7 +98,7 @@ (defn ci "Run the CI pipeline of tests (and build the JAR). - Default Clojure version is 1.9.0 (:1.9) so :elide + Default Clojure version is 1.10.3 (:1.10) so :elide tests for #409 on that version." [opts] (let [aliases [:cljs :elide :1.10 :1.11 :1.12] diff --git a/deps.edn b/deps.edn index b8d2cf4..d384356 100644 --- a/deps.edn +++ b/deps.edn @@ -1,6 +1,6 @@ {:mvn/repos {"sonatype" {:url "https://oss.sonatype.org/content/repositories/snapshots/"}} :paths ["src"] - :deps {org.clojure/clojure {:mvn/version "1.9.0"}} + :deps {org.clojure/clojure {:mvn/version "1.10.3"}} :aliases {;; for help: clojure -A:deps -T:build help/doc :build {:deps {io.github.clojure/tools.build {:mvn/version "0.10.6"} @@ -8,7 +8,6 @@ :ns-default build} ;; versions to test against: - :1.9 {:override-deps {org.clojure/clojure {:mvn/version "1.9.0"}}} :1.10 {:override-deps {org.clojure/clojure {:mvn/version "1.10.3"}}} :1.11 {:override-deps {org.clojure/clojure {:mvn/version "1.11.4"}}} :1.12 {:override-deps {org.clojure/clojure {:mvn/version "1.12.0"}}} diff --git a/doc/differences-from-1-x.md b/doc/differences-from-1-x.md index edb9daa..246fe00 100644 --- a/doc/differences-from-1-x.md +++ b/doc/differences-from-1-x.md @@ -9,7 +9,7 @@ The DSL itself -- the data structures that both versions convert to SQL and para If you are using Clojure 1.11, you can invoke `format` with a mixture of named arguments and a trailing hash map of additional options, if you wish. -HoneySQL 1.x supported Clojure 1.7 and later. HoneySQL 2.x requires Clojure 1.9 or later. +HoneySQL 1.x supported Clojure 1.7 and later. HoneySQL 2.7.x requires Clojure 1.10.3 or later. Earlier versions of HoneySQL 2.x support Clojure 1.9.0. ## Group, Artifact, and Namespaces @@ -90,7 +90,7 @@ The new namespaces are: * `honey.sql` -- the primary API (just `format` now), * `honey.sql.helpers` -- helper functions to build the DSL. -Supported Clojure versions: 1.9 and later. +Supported Clojure versions: 1.10.3 and later. ## API Changes diff --git a/src/honey/sql.cljc b/src/honey/sql.cljc index 4bcf9f8..44fe883 100644 --- a/src/honey/sql.cljc +++ b/src/honey/sql.cljc @@ -436,9 +436,7 @@ (defn- format-simple-var ([x] (let [c (if (keyword? x) - #?(:bb (str (symbol x)) - :clj (str (.sym ^clojure.lang.Keyword x)) ;; Omits leading colon - :default (subs (str x) 1)) + (str (symbol x)) (str x))] (format-simple-var x c {}))) ([x c opts] @@ -455,9 +453,7 @@ ;; for multiple / in the %fun.call case so that ;; qualified column names can be used: (let [c (if (keyword? x) - #?(:bb (str (symbol x)) - :clj (str (.sym ^clojure.lang.Keyword x)) ;; Omits leading colon - :default (subs (str x) 1)) + (str (symbol x)) (str x))] (cond (str/starts-with? c "%") (let [[f & args] (split-by-separator (subs c 1) ".")] @@ -1737,10 +1733,7 @@ (if (keyword? k) (if-let [n (namespace k)] (symbol n (name k)) - ;; In CLJ runtime, reuse symbol that's already present in the keyword. - #?(:bb (symbol (name k)) - :clj (.sym ^clojure.lang.Keyword k) - :default (symbol (name k)))) + (symbol (name k))) k)) (defn format-dsl