dwhjames / play-datomisca

Play Datomisca, Play! Framework 2.3 module for Datomic
https://dwhjames.github.com/datomisca/
Apache License 2.0
17 stars 2 forks source link

Get Sample 1 (Getting Started) to compile with 0.7 #13

Closed GitsMcGee closed 9 years ago

GitsMcGee commented 10 years ago

This PR is to get Sample 1 (getting started) to compile with Datomisca 0.7, Play 2.3, and Datomic 0.9xxx. The goal was to just get it working without changing any of the behavior. This is still WIP because, while I was able to get it to compile, I wasn't able to get it to run. I don't know if it ran before I touched it, but I'll assume so. I need a code review here.

This one was a bit tricky for me because I have never used Datomisca 0.6 before, so a lot of the code was foreign to me. So again, a code review would be good :)

When I run test I get the following error:

[error]    RuntimeException: : java.lang.IllegalArgumentException: :db.error/datoms-conflict Two datoms in the same transaction conflict: {:d1 #datom[17592186045452 72 17592186045433 13194139534333 true], :d2 #datom[17592186045452 72 17592186045432 13194139534333 true]}  (Selenium.scala:152)
[error] play.api.test.TestServer.start(Selenium.scala:152)
[error] play.api.test.PlayRunners$class.running(Helpers.scala:84)
[error] play.api.test.Helpers$.running(Helpers.scala:403)
[error] play.api.test.PlayRunners$class.running(Helpers.scala:74)
[error] play.api.test.Helpers$.running(Helpers.scala:403)
[error] test.IntegrationSpec$$anonfun$1$$anonfun$apply$1.apply(IntegrationSpec.scala:17)
[error] test.IntegrationSpec$$anonfun$1$$anonfun$apply$1.apply(IntegrationSpec.scala:17)
[error] datomic.error$arg.invoke(error.clj:55)
[error] datomic.error$arg.invoke(error.clj:53)
[error] datomic.db$datoms_conflict.invoke(db.clj:1440)
[error] datomic.db$create_card_one_validator$fn__2671.invoke(db.clj:1518)
[error] datomic.db$validated_tx_datoms$fn__2697.invoke(db.clj:1584)
[error] clojure.core$filterv$fn__6261.invoke(core.clj:6256)
[error] clojure.lang.ArrayChunk.reduce(ArrayChunk.java:63)
[error] clojure.core.protocols$fn__6041.invoke(protocols.clj:98)
[error] clojure.core.protocols$fn__6005$G__6000__6014.invoke(protocols.clj:19)
[error] clojure.core.protocols$seq_reduce.invoke(protocols.clj:31)
[error] clojure.core.protocols$fn__6024.invoke(protocols.clj:60)
[error] clojure.core.protocols$fn__5979$G__5974__5992.invoke(protocols.clj:13)
[error] clojure.core$reduce.invoke(core.clj:6177)
[error] clojure.core$filterv.invoke(core.clj:6257)
[error] datomic.db$validated_tx_datoms.invoke(db.clj:1584)
[error] datomic.db.ProcessExpander.getData(db.clj:2324)
[error] datomic.db$with_tx.invoke(db.clj:2355)
[error] datomic.peer.LocalConnection$fn__8278.invoke(peer.clj:535)
[error] datomic.peer.LocalConnection.transactAsync(peer.clj:535)
[error] datomisca.Connection$.transact$extension(Connection.scala:93)
[error] datomisca.TransactOps$class.transact(TransactOps.scala:53)
[error] datomisca.Datomic$.transact(Datomic.scala:31)
[error] Global$$anonfun$onStart$1$$anonfun$1$$anonfun$apply$1.apply(Global.scala:36)
[error] Global$$anonfun$onStart$1$$anonfun$1$$anonfun$apply$1.apply(Global.scala:35)
[error] Global$$anonfun$onStart$1$$anonfun$1.apply(Global.scala:35)
[error] Global$$anonfun$onStart$1$$anonfun$1.apply(Global.scala:27)
ghost commented 9 years ago

I think these was a case of errors in the original Seattle sample schema and tx data that came with the Datomic distribution: https://github.com/GitsMcGee/play-datomisca/pull/1

GitsMcGee commented 9 years ago

Ooof. Sorry it took so long to get back to this. Thanks to your PR and a couple of other minor tweaks, the app runs and the tests all pass. Again, I haven't made any attempt to actually refactor anything to take advantage or newer Datomisca features, but doing so later should hopefully now be a lot easier.