This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-11-21
Channels
- # beginners (165)
- # boot (9)
- # cider (9)
- # cljs-dev (5)
- # cljsjs (5)
- # clojars (4)
- # clojure (207)
- # clojure-brasil (1)
- # clojure-greece (3)
- # clojure-poland (2)
- # clojure-russia (6)
- # clojure-spec (85)
- # clojure-taiwan (1)
- # clojure-uk (53)
- # clojurescript (96)
- # community-development (2)
- # cursive (4)
- # datomic (14)
- # emacs (41)
- # events (2)
- # hoplon (184)
- # leiningen (1)
- # nginx (1)
- # off-topic (16)
- # om (7)
- # onyx (63)
- # pedestal (27)
- # planck (17)
- # protorepl (3)
- # rdf (9)
- # re-frame (62)
- # reagent (7)
- # ring-swagger (5)
- # schema (2)
- # spacemacs (5)
- # test-check (25)
- # untangled (93)
- # yada (3)
I have a 2000 lines long script with datoms that I read into the database (slurp + transact). Is there a way to get better error messages, for example telling me which fact or line in the file that contains the error (I know what the problem is but need to scope it down)? Now I just get: CompilerException java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: :db.error/tempid-not-an-entity tempid used only as value in transaction
I get Critical failure, cannot continue: Heartbeat failed
when doing an restore to an empty datomic:dev
database. What to do?
@teng not really a direct answer, but maybe you can transact speculatively (datomic.api/with) only small segments on your file to know where the problem is ?
@val_waeselynck I found the error by commenting out parts of the script and ran the script again and again. It works, but a better error message would be preferable.
When retracting an entity what is the best practice for finding out if that entity existed/was retracted. Should you query the :db-before
and :db-after
or is it ok to interpret it based on the :tx-data
(are there datums present that suggest the removal of an entity)?
@mbutler yes, that's the 5th element of a Datom
@grav do you have more details of your failure? what OS, what is the restore command you’re running? Any exceptions or errors in the transactor log?
@val_waeselynck yes, so you could look for a datum in the tx-data
that says that some attribute on the entity you want removing (probably the one you did the lookup using) has a 5 element of false
cool cool 🙂