Failing `next.jdbc` instrumentation during `conn/do-with-transaction` call · Issue #199 · camsaul/toucan2 · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
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 thenext.jdbc/with-transaction
call that's made in thetoucan2.jdbc.connection
ns'sconn/do-with-transaction
method fails with the following error in logs:So, basically,
next.jdbc/transact
does not expect you to passnil
opts, which is odd, I agree, since itswith-transaction
wrapper macro defaults them with~(or opts {})
anyway prior to calling thenext.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 intoucan2
, or in thenext.jdbc
itself (maybe the specs are out of sync?). So filing this issue here for now.Cheers,
Mark
The text was updated successfully, but these errors were encountered: