Discuss GraalVM related topics. Use clojure 1.10.2 or newer for all new projects. Contribute to and GraalVM slack:
katox 2020-04-24T08:47:37.186600Z

It won't be easy (even the pgsql supports only the happy path). Usually major lifting is done by java folks around frameworks like micronaut or quarkus or spring boot. Search their blogs for tips.

borkdude 2020-04-24T09:24:19.187200Z

btw, I have been able to get postgres support into babashka: more info here:

borkdude 2020-04-24T12:50:57.187800Z

@peterschwarz Did you manage to get sqlite to work at all though?

peterschwarz 2020-04-24T13:07:44.188500Z

Not, yet, though I’ll take a look at your postgres work - it might give me some hints

borkdude 2020-04-24T13:13:25.189Z

postgres was by far the easiest to get going with graalvm, also because I found a working example from @yogthos

borkdude 2020-04-24T13:13:48.189400Z

mysql requires a sh*t-ton of reflection config and it still didn't work

peterschwarz 2020-04-24T13:14:23.190Z

same with sqlite, from what I’ve seen

yogthos 2020-04-24T13:14:25.190200Z

pg is the only one I could get jdbc to work with as well

peterschwarz 2020-04-24T13:15:07.191100Z

With sqlite, I think the biggest hurdle is getting it to load the native library

peterschwarz 2020-04-24T13:16:04.191900Z

Which, side question, is there any way to write those graal reflection classes using gen-class?

peterschwarz 2020-04-24T13:16:21.192600Z

Seemed like I was running into some classpath issues on that front

borkdude 2020-04-24T13:16:28.192900Z

@peterschwarz you don't need to generate classes, you just have to list them in a reflection-config.json file

peterschwarz 2020-04-24T13:16:33.193100Z


peterschwarz 2020-04-24T13:16:44.193600Z

Do those just go into a resources directory?

borkdude 2020-04-24T13:16:49.193700Z

you can also use an agent to discover those classes using a runtime example

peterschwarz 2020-04-24T13:17:08.193900Z

That’s cool

peterschwarz 2020-04-24T13:22:20.196200Z

I take it one is able to express the same thing with just those json files?

borkdude 2020-04-24T13:32:24.196400Z


peterschwarz 2020-04-24T13:33:24.196600Z


peterschwarz 2020-04-24T13:33:36.197Z

I’ll have to take another stab at this tonight…

wcohen 2020-04-24T22:03:44.199500Z

My primary struggle with this was that most libraries that have multiplatform natives embedded first copy the appropriate platform one to a temp directory and loadLibrary from there — I couldn’t figure out how to replicate that in graal at runtime. It may only work if sqlite or whatever exists on the system already, which is much less pain-free for the user

peterschwarz 2020-04-24T22:17:52.199900Z

Yeah, I’m definitely fine with that approach