Merge pull request #95 from jolt-lang/migratus-fixes

Migratus fixes
This commit is contained in:
Dmitri Sotnikov 2026-06-13 23:13:43 +00:00 committed by GitHub
commit 52bea0b620
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 1214 additions and 114 deletions

View file

@ -123,9 +123,12 @@ deref = "@" , form ; (* (deref form) *)
metadata = "^" , meta-form , ws , form ; (* attach metadata to form *)
meta-form = map | keyword | symbol | string ;
(* Normalized like Clojure: a symbol or string is a type hint -> {:tag ...};
a keyword -> {keyword true}; a map is used as-is. On a symbol the metadata
rides on the symbol (it stays a bare symbol, so a hint like ^String is
transparent in params/lets/bodies); other targets use a runtime with-meta. *)
a keyword -> {keyword true}; a map is used as-is. A keyword/symbol/string
meta-form on a symbol rides ON the symbol (it stays a bare symbol, so a hint
like ^String is transparent in params/lets/bodies). A MAP meta-form routes
through a runtime (with-meta form ...) even on a symbol (jolt-8w2), so a name
with ^{:map} metadata reads as a form, not a bare symbol def/defn/defmacro/ns
unwrap that to the bare name (and attach the metadata). *)
(* --------------------------------------------------------------------------
Dispatch forms introduced by "#".

View file

@ -20,3 +20,20 @@ Libraries confirmed to load and pass their conformance checks on Jolt
(select/insert/update/delete/joins/:inline), loaded unmodified from git
* [clojure.jdbc](https://github.com/yogthos/clojure.jdbc) — as [jolt-lang/db](https://github.com/jolt-lang/db)'s
`jdbc.core`, reimplemented over janet sqlite3/pq drivers (SQLite + PostgreSQL)
* [next.jdbc](https://github.com/seancorfield/next-jdbc) — a compatibility layer in
[jolt-lang/db](https://github.com/jolt-lang/db) (`next.jdbc`, `next.jdbc.sql`,
`next.jdbc.prepare`, `next.jdbc.transaction`) over `jdbc.core`, for libraries
that target the next.jdbc API
* [tools.logging](https://github.com/clojure/tools.logging) — the real
`clojure.tools.logging` source runs verbatim. jolt provides a native
`clojure.tools.logging.impl` backend (a stderr `LoggerFactory` — the library's
designed extension point, where slf4j/log4j/jul adapters normally plug in) plus
the host shims it needs (`agent`/`send-off`, `clojure.lang.LockingTransaction`,
a `clojure.pprint` subset, `clojure.string/trim-newline`). The level macros,
`logf`/`logp`, `spy`, and `enabled?` all work; output goes to stderr.
* [migratus](https://github.com/yogthos/migratus) — database migrations; loads
unmodified and runs filesystem SQL/EDN migrations against SQLite through the
next.jdbc layer above. `migrate`/`rollback` round-trip end to end. Caveat:
migration ids are 14-digit timestamps, and the janet-lang/sqlite3 driver
currently truncates INTEGER columns to 32 bits, so completion tracking needs
the one-line upstream fix (`sqlite3_column_int64`); ids under 2^31 work as is.