Fork me on GitHub
#tools-build
<
2022-07-22
>
Lukas Domagala13:07:09

I’m trying to switch from depstar building to tools.build, but I’m somehow getting different dependency versions in my uberjar. clojure -X:deps treeis telling me that com.google.code.gson/gson 2.9 is going to be used (that’s what I put into my dependencies) and that works with depstar. Doing the same aot -> uberjar compile with tools.build somehow adds version 2.7 instead of 2.9 to my jar. Any ideas why this is happening? I’ve been banging my head against this wall for the a whole day now 😞

Lukas Domagala14:07:35

after forever I finally figured out that somehow https://github.com/replikativ/datahike pulls it in, just not sure how, since it doesn’t get show as a dep and excluding it doesn’t help

Lukas Domagala16:07:04

For anyone else running into this: the problem was that datahike is pulling in clojurescript, which is an uberjar and that is bringing in its own deps that can’t be excluded.

Lukas Domagala16:07:25

To fix it for this case it’s ok to add :exclusions [org.clojure/clojurescript] in your deps. Might be more problematic in other cases.