Fork me on GitHub
#crux
<
2019-10-22
>
JanisOlex12:10:34

hi guys... next problem with crux 🙂

JanisOlex12:10:38

when I jarsign the .jar containing dependency on crux, then jarsigner fails as it spots duplicate (actually triplicate) entry of project.clj in final jar... so I assume one coming from clojure, other from taonesso... Question - is project.clj needed/used during actual runtime?

JanisOlex12:10:55

or I might somehow get rid of it during .jar building

JanisOlex12:10:05

have you ever tried to jarsign the crux jar?

Ivan Fedorov12:10:35

Hi @olekss.janis! Welcome back 🙂 project.clj shouldn’t be required at runtime, so you can get omit it from a jar. We should omit it as well, good spot.

JanisOlex12:10:33

ok... btw, what evil would happen if you would aot your stuff? your previous fix fixed our problem, but still startup for first time is kinda slow... would aot fix it and wouldn't it break something necessary ? (this is not requirement, just curious)

Ivan Fedorov12:10:59

Not sure if aot would help. aot could lead into in class version conflicts between different crux modules, or if you or one your dependencies will use the same library as crux.

JanisOlex13:10:04

my solution to project.clj during signing is to have this section at the build.gradle of the module containing the crux dependency (and one being signed over) jar { exclude("project.clj") }

Ivan Fedorov13:10:23

You might be able to aot yourself with gradle plugin

JanisOlex13:10:40

yea, no sweat for that for now...

JanisOlex13:10:27

another question -> if I have jdbc connection, can I pass/inject it into crux to use, as we would like to have crux piggyback on our transaction

JanisOlex13:10:22

during writes

jonpither13:10:03

hi @olekss.janis - the current JDBC implementation uses https://github.com/seancorfield/next-jdbc, it uses this library to get a Datasource that is used for subsequent options. Your current options would be to provide your own crux.db.TxLog to override the JdbcTxLog that is used and delegate accordingly, or hook into next-jdbc somehow

jonpither13:10:30

Whats the advantage of piggybacking out of interest

JanisOlex14:10:03

coz there is our service which write stuff into DB, and we want to use crux for indexing... and the task is obvious, to have both of them written succesfully or both fail... question of record consistency

👍 1
jonpither14:10:48

Will ponder and reply!