Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not compatible with datomic 1.0.6527 #10

Open
favila opened this issue Jan 4, 2023 · 5 comments
Open

Not compatible with datomic 1.0.6527 #10

favila opened this issue Jan 4, 2023 · 5 comments

Comments

@favila
Copy link
Contributor

favila commented Jan 4, 2023

Datomic 1.0.6527 added additional methods to the Connection interface related to io-stats to support the new arities of transact and transact async. The datomic.api/transact and transact-async wrappers seem to always use this new method, even if called with only one argument.

This means datomock fails with 1.0.6527. Exceptions look like this:

Uncaught exception, not in assertion.
Exception: java.lang.AbstractMethodError: Method datomock/impl/MockConnection.transact(Ljava/util/List;Ljava/lang/Object;)Ldatomic/ListenableFuture; is abstract
 at datomock.impl.MockConnection.transact (impl.clj:-1)
    datomic.api$transact.invokeStatic (api.clj:107)
    datomic.api$transact.doInvoke (api.clj:105)
    ...

A quick fix is to add the additional method signatures but ignore the io-stat argument:

(defrecord MockConnection [...]
  Connection
  ...
  (transact [this tx-data _] (.transact this tx-data))
  (transactAsync [this tx-data _] (.transact this tx-data))
  ...
)
@favila favila changed the title Not compatible with datomic 1.0.6397 Not compatible with datomic 1.0.6527 Jan 4, 2023
@favila
Copy link
Contributor Author

favila commented Jan 5, 2023

I added #11 to address this.

@favila
Copy link
Contributor Author

favila commented Jan 6, 2023

For any future readers: A fork with this patch is available on clojars with coordinate [org.clojars.favila/datomock "0.2.2-favila1"]. We are already using it in our (large) datomock-using test suite with 1.0.6527 without any issues.

@svdo
Copy link

svdo commented May 1, 2023

Thanks @favila! Would love it if a new release could be made from this repo as well, being the official one. Thanks in advance! :)

@dazld
Copy link

dazld commented Jun 30, 2023

@favila thanks a ton - @vvvvalvalval any chance of a release to fix this?

@holyjak
Copy link

holyjak commented May 5, 2024

@vvvvalvalval could you be so very kind and release this fix? It blocks Fulcro from abandoning the old datomic-free for the new, truly free stuff. 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants