This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-07-01
Channels
- # atom-editor (11)
- # babashka (25)
- # beginners (142)
- # boot (9)
- # calva (3)
- # cider (19)
- # clara (15)
- # clj-kondo (6)
- # cljs-dev (20)
- # clojars (11)
- # clojure (164)
- # clojure-dev (9)
- # clojure-europe (6)
- # clojure-italy (17)
- # clojure-nl (3)
- # clojure-spec (19)
- # clojure-sweden (10)
- # clojure-uk (23)
- # clojurescript (34)
- # code-reviews (31)
- # conjure (20)
- # cursive (14)
- # datomic (54)
- # emacs (1)
- # fulcro (51)
- # graalvm (24)
- # graphql (6)
- # helix (3)
- # jobs (3)
- # kaocha (1)
- # malli (2)
- # meander (15)
- # off-topic (81)
- # pathom (2)
- # re-frame (43)
- # reagent (26)
- # reitit (1)
- # releases (1)
- # sci (12)
- # shadow-cljs (29)
- # sql (22)
- # timbre (3)
- # tools-deps (15)
@lee I am using classes from svm. I'm not sure what GraalVM SDK vs svm is. import com.oracle.svm.core.annotate.Substitute; import com.oracle.svm.core.annotate.TargetElement; import com.oracle.svm.core.annotate.TargetClass; import com.oracle.svm.core.jdk.JDK11OrLater;
Problem is that tools deps includes tar.gz files from org.graalvm.nativeimgage/svm in classpath which causes native-image to fail. I looked at deps within org.graalvm.nativeimage/svm and found org.graalvm.sdk/graal-sdk which seems to have all we really need.
@lee What I don't understand is that the SDK jar doesn't mention any svm jars:
ls_jar.clj org.graalvm.sdk/graal-sdk 20.1.0 | grep svm
while I'm importing these:
import com.oracle.svm.core.annotate.Substitute;
Maybe the dependency isn't needed once it's compiled? But that's not how Java classes work right?
Ya I was out to lunch with thinking org.graalvm.sdk/graal-sdk
helped. If I leave it out as well, my compile still works. If I look at output from native-image
I see that there is a lib/svm/builder/svm.jar
from Graal’s install dir included for both native-image’s -cp
and -imagecp
. This svm.jar
contains all classes you listed above.
still the svm.jar would be the same version in the dependency as in Graal's install, so don't think it's needed and the problem might be elsewhere
I guess it is more like a provided dep then. It would be harmless if tools deps handled native deps like lein seems to, but tools deps does not.
If leaving it in is correct then https://github.com/borkdude/clj-reflector-graal-java11-fix README could be updated on tools dep usage. Happy to PR, lemme know.
Glad to do my part. @aviflax was the one who started the ball rolling (thanks @aviflax!).