This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-08-06
Channels
- # aleph (1)
- # beginners (180)
- # calva (16)
- # cider (29)
- # clj-kondo (47)
- # cljsrn (5)
- # clojure (40)
- # clojure-dev (39)
- # clojure-europe (1)
- # clojure-italy (25)
- # clojure-nl (9)
- # clojure-russia (1)
- # clojure-spec (8)
- # clojure-uk (83)
- # clojurescript (54)
- # core-async (2)
- # datomic (20)
- # defnpodcast (7)
- # figwheel (6)
- # fulcro (6)
- # jobs (5)
- # joker (4)
- # kaocha (4)
- # luminus (4)
- # off-topic (8)
- # onyx (6)
- # pathom (14)
- # re-frame (28)
- # reagent (30)
- # remote-jobs (2)
- # shadow-cljs (88)
- # spacemacs (2)
- # specter (17)
- # sql (25)
- # tools-deps (78)
- # xtdb (1)
- # yada (2)
In the latest version of [com.datomic/datomic-pro "0.9.5951"]
, the namespace com.datomic:client-api:jar:0.8.35:compile
is included.
I'd like to use the Peer API, but this namespace inclusion is tripping up the automatic :peer
vs :cloud
vs :client
discovery mechanism in onyx.datomic.api
--
(defn- _datomic-lib-type []
(if (find-ns 'datomic.client.api)
(try (require '[datomic.client.impl.cloud])
:cloud
(catch FileNotFoundException _ :client))
:peer))
(def datomic-lib-type (memoize _datomic-lib-type))
The oldest release I'm allowed to go back to in http://my.datomic.com is "0.9.5783"
, which still has com.datomic:client-api:jar:0.8.7
.
I found two ways around this:
;; A) project.clj
[com.datomic/datomic-pro "0.9.5951"
:exclusions [[com.datomic/client-api]]]
;; B) shim in your (-main) namespace
;; UPDATE: further testing reveals that this shim doesn't work. use :exclusions
(alter-var-root #'onyx.datomic.api/datomic-lib-type (constantly :peer))
As far as a permanent solution: I don't believe the client-api includes namespace datomic.api
, so might fix it to check for that namespace first. The last version of the client API I could find to test with is [com.datomic/client-pro "0.8.28"]
, which definitely doesn't have that namespace.
If preferred, I can open a PR with the fix, but I wanted to check with this channel first to confirm that this is actually what's going on here.@quest I would be happy to accept any PR that fixes this. I think the datomic plugin hasn’t been updated in some time, so your analysis makes sense.
@lmergen Opened https://github.com/onyx-platform/onyx-datomic/pull/37 Note -- this is likely to break anyone who was including both Datomic Pro & Datomic Client in the same uberjar. The README.md warns against this, but it's still possible to do