From bdcad838959813e699a8b7706cb21e28ea52f661 Mon Sep 17 00:00:00 2001 From: Yogthos Date: Tue, 1 Sep 2026 00:45:52 -0400 Subject: [PATCH] Declare the java.sql classes db.jdbc-shim provides MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit clojure.jdbc resolves the java.sql constants as its namespaces COMPILE, so the reference lands before anything of this library has loaded. Declaring the classes (RFC 0014) is what lets jolt autoload the shim on that first miss, for a project that depends on db and no other — instead of the runtime carrying a list of libraries and deciding for everyone. Fully-qualified only; jolt derives the simple spelling, which is what the old hardcoded table got wrong by listing both by hand. Inert on jolt 0.8.0: unknown deps.edn keys are ignored, so a consumer still requires db.jdbc before jdbc.core as the README says, and gains the autoload once a jolt that reads this ships. --- deps.edn | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/deps.edn b/deps.edn index 6e8a651..ecb4438 100644 --- a/deps.edn +++ b/deps.edn @@ -5,6 +5,16 @@ :paths ["clj"] + ;; The java.sql classes db.jdbc-shim installs (RFC 0014). clojure.jdbc resolves + ;; these as its namespaces COMPILE, so the reference lands before anything of + ;; this library has loaded; declaring them here is what lets jolt autoload the + ;; shim on that first miss, for a project that depends on db and no other. + ;; Fully-qualified only — jolt derives the simple spelling. + :jolt/provides {db.jdbc-shim ["java.sql.ResultSet" + "java.sql.Connection" + "java.sql.Statement" + "java.sql.DriverManager"]} + ;; clojure.jdbc is the API this library exposes: the published library running on ;; the java.sql shim in db.jdbc-shim, rather than a reimplementation of it here. ;; Require db.jdbc once before jdbc.core so the shim is registered first.