graalvm

Discuss GraalVM related topics. Use clojure 1.10.2 or newer for all new projects. Contribute to https://github.com/clj-easy/graal-docs and https://github.com/BrunoBonacci/graalvm-clojure. GraalVM slack: https://www.graalvm.org/slack-invitation/.
lread 2021-02-11T18:11:06.149Z

Nothing advanced in this GraalVM presentation, but it gives a good overview of benefits of using GraalVM as your regular JDK and then effects of native-image. https://youtu.be/NXyACuQuIHI

borkdude 2021-02-11T19:53:31.149700Z

Small note: the enterprise edition has better performance than the community edition (which should it turn have better performance than other JVMs, at least that is their goal)

borkdude 2021-02-11T19:53:37.149900Z

Thanks for the link

kwrooijen 2021-02-11T20:12:18.153500Z

Anyone have experience with Github Action + lein-native? I'm trying to compile a native-image with the --static flag. But I get the following error: com.oracle.svm.core.util.UserError$UserException: Must specify main entry point class when building EXECUTABLE native image. Use '-H:Class=<fully-qualified-class-name>'. The MacOS build also seems to fail. lein-native builds seem to work (linux non-static and windows). The build (with error): https://github.com/kwrooijen/hiccup-cli/runs/1882255111?check_suite_focus=true My GH Action yml: https://github.com/kwrooijen/hiccup-cli/blob/master/.github/workflows/release.yml project.clj / graalvm config: https://github.com/kwrooijen/hiccup-cli/blob/master/project.clj If anyone has an idea that would be great. I can move away from lein-native if I have to but it would be nice if I could keep using it.

kwrooijen 2021-02-11T20:12:54.153900Z

(Sorry, the NON static binaries break)

kwrooijen 2021-02-11T20:21:12.154300Z

oh hmm.. my build is failing locally apparently

phronmophobic 2021-02-11T20:21:34.155Z

it looks like you need an else branch with -H:Class=<fully-qualified-class-name> at https://github.com/kwrooijen/hiccup-cli/blob/master/project.clj#L2

kwrooijen 2021-02-11T20:22:08.155500Z

You must be right

kwrooijen 2021-02-11T20:22:21.155800Z

I assumed an empty string would be ignored

phronmophobic 2021-02-11T20:23:45.156700Z

the error is saying you have to have a main if you're building an executable

kwrooijen 2021-02-11T20:24:27.157400Z

I think this should work if I remove the empty string

borkdude 2021-02-11T20:24:50.158100Z

This is why I never use tools to compile with native-image. Why wrap a tool with another tool which only complicates things, in my opinion.

kwrooijen 2021-02-11T20:25:36.158700Z

No thanks 😛

borkdude 2021-02-11T20:26:23.159200Z

I love bash

13😂
kwrooijen 2021-02-11T20:27:08.160400Z

Why use Babashka when you can use bash

borkdude 2021-02-11T20:27:15.160900Z

Exactly

kwrooijen 2021-02-11T20:27:19.161200Z

Back to basics

lread 2021-02-11T20:27:39.161400Z

I wrote my script in babashka of course, you should try it sometime @borkdude!

kwrooijen 2021-02-11T20:47:39.161700Z

It works! Thanks. I get to keep my extra complicated setup for no reason now

borkdude 2021-02-11T20:48:13.161900Z

So what was it?

kwrooijen 2021-02-11T20:48:26.162300Z

The empty string, thought it would get ignored

kwrooijen 2021-02-11T20:48:31.162500Z

But apparently it broke my build

borkdude 2021-02-11T20:49:44.162900Z

makes sense

lread 2021-02-11T20:51:15.163400Z

It was your main problem 🙂

1😆