This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-07-09
Channels
- # announcements (2)
- # babashka (33)
- # beginners (122)
- # bristol-clojurians (1)
- # calva (6)
- # chlorine-clover (3)
- # cider (45)
- # clara (10)
- # clj-kondo (3)
- # cljsrn (17)
- # clojure (80)
- # clojure-dev (21)
- # clojure-europe (86)
- # clojure-italy (5)
- # clojure-japan (5)
- # clojure-losangeles (7)
- # clojure-nl (5)
- # clojure-portugal (3)
- # clojure-uk (31)
- # clojurescript (30)
- # conjure (4)
- # core-async (29)
- # cursive (20)
- # data-science (25)
- # datomic (7)
- # duct (17)
- # figwheel-main (73)
- # fulcro (23)
- # jobs-discuss (36)
- # juxt (5)
- # kaocha (2)
- # lambdaisland (6)
- # luminus (5)
- # malli (17)
- # mount (10)
- # music (7)
- # off-topic (16)
- # re-frame (30)
- # ring (17)
- # rum (1)
- # shadow-cljs (10)
- # spacemacs (10)
- # specmonstah (4)
- # sql (45)
- # tools-deps (21)
- # xtdb (20)
anyone tried compiling the datomic client jar into babashka? not sure if its compatable or that's allowed, but would be great to be able to run one-off queries
if it’s datomic-pro
it likely wouldn’t work because of at least the aws dependency (although maybe that would not be used). In general i would be surprised if it works. Your best bet is to use a datomic rest client
Depends on the deployment, possibly
my hope was the client specifically would have more minimal deps as it's mostly an HTTP / core.async wrapper, Deps are here: https://search.maven.org/artifact/com.datomic/client/0.8.103/jar
Datomic REST API is officially deprecated, also lacks some key things like response chunking, timeouts etc, transit serialization etc
• datomic client dynamically loads classes depending use, had to directly require the dependents • datomic client also uses an .pem certificate included as a resources in one of the deps, I had to add a resources regex allow in the native-image script to import that • also had to add a few classes to the reflection list • am currently stuck at the following
clojure.lang.ExceptionInfo: Class java.nio.HeapByteBuffer[] is instantiated reflectively but was never registered. Register the class by using org.graalvm.nativeimage.hosted.RuntimeReflection
@U04V15CAJ have you had to register any classes via org.graalvm.nativeimage.hosted.RuntimeReflection
in babashka yet?
yes, interestingly that worked for all the other classes used with reflection, somehow java.nio.HeapByteBuffer
seems to be treated differently
so it would seem. What's the syntax for referencing an array class like that from clojure? was adding here https://github.com/borkdude/babashka/blob/master/src/babashka/impl/classes.clj#L136-L147
I think this one also one: https://github.com/borkdude/babashka/blob/8e7d4d4bbfe8034e27eee4d9579095fcd1b78018/src/babashka/impl/classes.clj#L192
time ./bb --file client-test.clj
{:user/firstname "Brian (Bingo)", :user/lastname "Hurlow"}
0.11 real 0.04 user 0.03 sys
Cool, seconded!
@U04V15CAJ put the above in a PR for your perusal, let’s discuss there if you have any thoughts. https://github.com/borkdude/babashka/pull/505