Fork me on GitHub

@borkdude is there a way to repro the http-client reflection warning on the JVM? I am happy to fix it but don't see a warning when loading the namespace (from Java 11).


@stuarthalloway After closer inspection, I think the warning came from using import java.lang.reflect.Array;. This is the warning I got from graalvm:

"Class java.nio.HeapByteBuffer[] is instantiated reflectively but was never registered. Register the class by using org.graalvm.nativeimage.hosted.RuntimeReflection"
from around line 108 in the cognitect.http-client namespace and this config fixed it for me (using a reflection.json config file):
  {"name": "[Ljava.nio.HeapByteBuffer;"}
So it's no longer a problem for me and probably not something that can be fixed without avoiding reflect.Array, which is used by into-array (although it's the first time I encountered this specific problem with into-array). Thanks for looking into it and sorry for taking up your time.


@borkdude Thanks for all you are doing exploring that is possible with GraalVM. I don't use it for day job stuff (yet?), but if there is low hanging fruit happy to help grab it.

👍 3
❤️ 3

Good to hear. For context, we are working on a babashka aws pod (which wraps aws-api), which runs natively, so you can use aws-api in scripts without a JVM with very fast startup time.

👀 1
🆒 1

Babashka pods are basically CLIs but they expose their data through EDN or Transit (or JSON) and can be called using normal functions instead of shelling out, RPC-style.


that sounds terrific


This is a list of existing pods that can already be used from babashka: A few of them are written in Clojure and compiled with GraalVM native-image.


Which AWS service(s) are you planning on exposing?


all that are available in aws-api


we have a working prototype, but there is some stuff around aws-api returning an inputstream for resources from s3 (and possibly others) which we have to translate into bytes, because it has to go over the wire via transit


it seems that aws-api turns a byte buffer into an inputstream for some reason