graalvm

Karol Wójcik 2024-08-14T07:44:48.250969Z

Hmm, I was asked by GraalVM member to gather valuable insights from Clojure team regarding this issue: https://github.com/oracle/graal/issues/9322 Frankly, I don’t know if there is anything other than “graalvm analyzer should not reach here” insight.

borkdude 2024-08-14T08:05:46.331829Z

Clojure namespaces have to be initialized at buid time. This is why https://github.com/clj-easy/graal-build-time exists.

Karol Wójcik 2024-08-14T08:23:22.173759Z

Yes, totally agree and the correct namespaces are initialized I believe.

borkdude 2024-08-14T08:24:30.942879Z

I don't see that in your compile script. https://github.com/FieryCod/graalvm-repro/blob/main/compile.sh

borkdude 2024-08-14T08:24:55.162269Z

Try adding: --initialize-at-build-time=nativetest.main

borkdude 2024-08-14T08:26:24.654489Z

oh my bad, it has nativetest

🙈 1
borkdude 2024-08-14T08:26:28.346009Z

overlooked that

borkdude 2024-08-14T08:30:53.788699Z

FWIW, bb has java.util.UUID in its reflection config and it works

borkdude 2024-08-14T08:32:59.925539Z

I recommend making your repro more minimal. Just Keyword in the reflect config will trigger this issue. Also you can remove the java.util.UUID thing in the script

borkdude 2024-08-14T08:33:15.742339Z

why do you need Keyword in your reflect config?

borkdude 2024-08-14T08:34:49.796999Z

Also this makes it work in the reflect config:

[
  {
    "name" : "clojure.lang.Keyword"
  }
]
tl;dr: just search for the specific method that triggers the warning and dig deeper from there. repro can be improved.

👍 1
borkdude 2024-08-14T08:39:20.446499Z

minimal reflect config repro:

[
  {
    "name" : "clojure.lang.Keyword",
    "methods": [{"name": "intern"}]
  }
]

Karol Wójcik 2024-08-14T10:35:47.485509Z

Many thanks @borkdude!