Fork me on GitHub
#babashka
<
2020-09-14
>
Jakub Holý06:09:40

Thanks, Michiel! The problems with the Cognitect aws-api is the signing, which I believe somebody has at least partially reimplemented for ClojureScript (and could perhaps be ported to a GraalVM-friendly Clojure) and locking, which will likely need to wait for https://clojure.atlassian.net/browse/CLJ-1472 in (hopefully) the next release of Clojure, correct? I see @jeroenvandijk has published a fork of aws-api that can run the signing in cljs / graalvm. However the aws-api team does https://github.com/cognitect-labs/aws-api/pull/121#issuecomment-667414548 about this problem: > This is not a priority for us, and is not on any near or mid-term road map. We're not closed to the idea, but it would increase the maintenance burden, so we wouldn't pursue it without a very strong rationale.

borkdude06:09:56

@holyjak 1472 is no longer a problem, released as 1.10.2-alpha1

👌 3
jeroenvandijk07:09:21

@holyjak I’m not sure what the current status is of compiling the Cognitect aws-api with Graalvm. Might be worth to try again

borkdude07:09:59

Dynamic requires are usually the problem

borkdude07:09:07

But those are pretty easy to patch

borkdude07:09:54

I noticed that with babashka, when including some libraries, they yield a binary with 30mb added, only because they have a runtime require in them

jeroenvandijk07:09:22

How would you patch it?

borkdude07:09:52

Copy the library and make requires static

borkdude08:09:03

Sometimes alter-var-root also works

borkdude08:09:29

But beware when using direct linking, all other places that use the patched var also have to be patched

Jakub Holý08:09:58

is there any page with tips and tricks like these for porting a lib to graalvm?

borkdude08:09:21

there sure is

borkdude07:09:52

@holyjak If it's just s3 you could also consider shelling out to the aws cli

👍 3
Jakub Holý08:09:55

good idea, thanks!

borkdude19:09:23

Just shared a new cool project in #sci