Fork me on GitHub
#aws
<
2021-01-03
>
borkdude19:01:20

@dchelimsky Thanks for fixing the reflection warnings on aws-api master. I and a group of people are trying to use the lib with GraalVM native-image and that helps. Can we use the master version using deps.edn? Is this just a matter of updating com.cognitect.aws/api {:mvn/version "0.8.484"} to the master SHA?

dchelimsky19:01:41

Yes, that’s how you do it.

borkdude19:01:58

cool, thanks

👍 3
valtteri19:01:08

Sounds interesting! Is there discussion somewhere where I could follow?

borkdude19:01:57

@U6N4HSMFW About using it with native-image?

valtteri19:01:43

Yea, I’m guessing you’re trying to get it to work with babashka?

borkdude19:01:55

@U6N4HSMFW correct, we're writing a babashka pod

valtteri19:01:52

That would be super cool. I’m interested to spectate at least but I can also try to help if I can. My gh username is vharmain

borkdude19:01:00

OK, I'll add you

valtteri19:01:13

Thanks a lot!

borkdude21:01:43

@dchelimsky I'm looking at a reflection warning in the cognitect.http-client code, but I have trouble finding where that is hosted on github. Is that generated code perhaps?

borkdude21:01:40

it's around line 108 in the cognitect.http-client namespace:

"Class java.nio.HeapByteBuffer[] is instantiated reflectively but was never registered. Register the class by using org.graalvm.nativeimage.hosted.RuntimeReflection"

borkdude21:01:32

Can also fix this using a config

dchelimsky22:01:25

The code is open source (it’s in the jar), but the repo is not public.

borkdude22:01:33

yeah, I already found the source using (slurp (io/resource ...)) :)

dchelimsky22:01:18

How can you fix it with a config?

borkdude22:01:39

In GraalVM native-image you can pass it a config with classes that need reflection: Mine now looks like:

[
  {"name": "[Ljava.nio.HeapByteBuffer;"}
]
to fix the issue with the http-client

borkdude22:01:13

Preferably you fix the reflection issue, but if you really can't this is a way to deal with it

dchelimsky22:01:34

I don’t own that repo, but I know the people who do 😉

borkdude22:01:59

I meant "you" in the general sense :)

borkdude22:01:11

when dealing with native-image

dchelimsky22:01:01

I’ve reported it, but I don’t anticipate hearing anything back before tomorrow. I’ll follow up here when I know something.

borkdude22:01:53

cool, thanks a lot