Welcome! Please see the About page for a little more info on how this works.

+2 votes
in dev-tools by

Hi, is there a disparity between Client API's pull and dev-local's pull?

(d/pull db '[*] nil)   ; eid arg is nil, what happens next?
  • Dev-local returns nil
  • Client API in Cloud throws an exception about eid being nil.

Is there a good reason why that is so?
Or should dev-local be fixed to increase parity?

Thanks!

c.f. original discussion on Slack

1 Answer

0 votes
by
selected by
 
Best answer

Hi @Djomphe-elyada.

Thank you for this report! The behavior between dev-local/client-cloud/peer-client is undefined behavior and we could do a better job of truing that behavior up. I have made a ticket to that effect, but the problem here is that d/pull requires an eid. Our api docs show the expected args for d/pull and you should rely upon that documented behavior.

https://docs.datomic.com/client-api/datomic.client.api.html#var-pull

Thanks,
Jaret

by
Hi Jaret,

I was wondering if there are any plans to release a new version of `dev-local` with a fix for this issue. While it may not seem like a significant problem, it's causing much trouble. Specifically, because ` dev-local` doesn't throw an exception, we're unable to catch bugs until we deploy our code to staging or production, even though we've written many unit/integration tests.

Thanks,

HP
...