Fork me on GitHub
#holy-lambda
<
2021-10-20
>
coltnz01:10:31

Trying to build clojure-runtime without SAM and getting a bit lost. Any tips?

Karol Wójcik06:10:48

What is the problem?

Karol Wójcik06:10:44

If you targeting the Clojure backend then the procedure is: 1. Run bb hl:compile 2. Build a docker image 3. Create an ECR and deploy the image 4. Use PackageType Image, and reference the image uri in your cdk.

Karol Wójcik06:10:23

Anyway highly encourage to rather stick to native backend if you care about cold starts.

coltnz19:10:15

Thanks. Yeah I'm currently blocked on native with compiling cognitect-aws.

coltnz19:10:38

Thought too the clojure runtime might be useful for integration tests

Karol Wójcik19:10:44

Have you checked the examples? I got plenty users that utilize cognitect-aws.

Karol Wójcik19:10:56

What service are you trying to integrate?

coltnz19:10:01

Compiler was crashing on a Jetty class

coltnz19:10:32

I think the next version of Graal fixes it

Karol Wójcik20:10:05

Nah. Just show your stacktrace, so that I can help.

Karol Wójcik20:10:37

See an example: https://github.com/FieryCod/holy-lambda/blob/master/examples/bb/native/sqs.example/src/sqs/example/core.cljc Anyway if you want only cognitect AWS api you can safely use babashka backend ;)

coltnz21:10:51

Caused by: org.graalvm.compiler.graph.GraalGraphError: java.lang.NullPointerException
	at node: 1281|+ { nodeSourcePosition=at org.eclipse.jetty.util.TypeUtil.<clinit>(TypeUtil.java:192) [bci: 996], stamp=i32,  }

coltnz21:10:21

Seemed to hard to fix, other than downgrading graal perhaps

Karol Wójcik05:10:08

What graalvm version do you use?

Karol Wójcik06:10:40

Btw is it possible for you to create a minimal repro?

Karol Wójcik08:10:53

This is first time I'm seeing this!

coltnz06:10:01

Built OK with latest Graal

Karol Wójcik07:10:01

Btw you're not using docker images?

coltnz01:10:48

Would like to deploy with CDK

Benjamin08:10:42

https://github.com/SingularityGroup/support-bot-announce here is a recent example using graalvm and cdk. It was copied from Karols azure example

Karol Wójcik08:10:40

Cool! May I include this project in Examples section in README.md?