replikativ/datahike

[Bug]: Metadata is incorrect for various functions

Opened this issue · 0 comments

What version of Datahike are you using?

0.6.1558

What version of Java are you using?

17

What operating system are you using?

MacOS

What database EDN configuration are you using?

N/A

Describe the bug

A Cursive user has filed cursive-ide/cursive#2880, because Cursive can't see the Datahike API due to the fact that it's generated at runtime via introspection, and Cursive uses static analysis. Cursive has a solution for that via stub generation, but when I implement that for Datahike I get arity errors using common functions in the API (e.g. d/transact and d/q). This is because those functions have their arglists incorrectly specified in their metadata, which Cursive uses to generate the stubs. This will also affect generated API documentation and the like, and probably clj-kondo also.

What is the expected behaviour?

The arglists should correctly specify the expected parameters in the metadata.

How can the behaviour be reproduced?

Use (meta #'d/transact) or (meta #'d/q), and observe that the arglists meta doesn't match the examples in the actual function documentation.