Description
Hi! I'm half way through the migration from Toucan 1, and everything works fine so far. Still, I am yet to migrate from the toucan2-toucan1
lib. And it seems like this may be causing the issue.
If I enable the next.jdbc
instrumentation in REPL via (next.jdbc.specs/instrument)
, then the next.jdbc/with-transaction
call that's made in the toucan2.jdbc.connection
ns's conn/do-with-transaction
method fails with the following error in logs:
Root: clojure.lang.ExceptionInfo - Call to next.jdbc/transact did not conform to spec.
data: {:clojure.spec.alpha/problems ({:path [:opts], :pred clojure.core/map?, :val nil, :via [:next.jdbc.specs/opts-map :next.jdbc.specs/opts-map], :in [2]}) ...
So, basically, next.jdbc/transact
does not expect you to pass nil
opts, which is odd, I agree, since its with-transaction
wrapper macro defaults them with ~(or opts {})
anyway prior to calling the next.jdbc/transact
.
As I didn't finish my migration to Toucan 2 yet, I only may guess atm if the root cause of this one is in toucan2-toucan1
, or in toucan2
, or in the next.jdbc
itself (maybe the specs are out of sync?). So filing this issue here for now.
Cheers,
Mark