Fork me on GitHub
#graalvm
<
2021-02-11
>
lread18:02:06

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

borkdude19:02:31

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)

borkdude19:02:37

Thanks for the link

Kevin20:02:18

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.

Kevin20:02:54

(Sorry, the NON static binaries break)

Kevin20:02:12

oh hmm.. my build is failing locally apparently

phronmophobic20:02:34

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

Kevin20:02:08

You must be right

Kevin20:02:21

I assumed an empty string would be ignored

phronmophobic20:02:45

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

Kevin20:02:27

I think this should work if I remove the empty string

borkdude20:02:50

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.

Kevin20:02:36

No thanks 😛

borkdude20:02:23

I love bash

😂 11
babashka 4
Kevin20:02:08

Why use Babashka when you can use bash

Kevin20:02:19

Back to basics

lread20:02:39

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

Kevin20:02:39

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

borkdude20:02:13

So what was it?

Kevin20:02:26

The empty string, thought it would get ignored

Kevin20:02:31

But apparently it broke my build

borkdude20:02:44

makes sense

lread20:02:15

It was your main problem 🙂

😆 4