This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-09-01
Channels
- # aleph (2)
- # announcements (3)
- # architecture (9)
- # babashka (56)
- # beginners (18)
- # calva (7)
- # catalyst (16)
- # cider (18)
- # cljfx (3)
- # cljs-dev (23)
- # clojure-europe (11)
- # clojure-hungary (1)
- # clojure-nl (2)
- # clojure-norway (24)
- # clojure-sweden (2)
- # clojurescript (37)
- # code-reviews (47)
- # datalog (3)
- # datomic (8)
- # emacs (11)
- # events (2)
- # graalvm (7)
- # gratitude (1)
- # hyperfiddle (12)
- # java (1)
- # jvm (46)
- # kaocha (3)
- # lsp (3)
- # malli (4)
- # matcher-combinators (1)
- # music (1)
- # nbb (1)
- # nrepl (4)
- # releases (1)
- # sci (15)
- # shadow-cljs (21)
- # slack-help (21)
- # tools-deps (17)
I just noticed this command after the native-image
build in bb run libsci:compile
/usr/lib/jvm/java-17-openjdk-amd64/bin/java \
-XX:-OmitStackTraceInFastThrow \
-classpath /home/ingy/.deps.clj/1.11.1.1347/ClojureTools/clojure-tools-1.11.1.1347.jar \
clojure.main \
-m clojure.tools.deps.script.make-classpath2 \
--config-user /home/ingy/.clojure/deps.edn \
--config-project deps.edn \
--basis-file .cpcache/F6929CC9A17B2FF3D31EE7A6D061797C.basis \
--cp-file .cpcache/F6929CC9A17B2FF3D31EE7A6D061797C.cp \
--jvm-file .cpcache/F6929CC9A17B2FF3D31EE7A6D061797C.jvm \
--main-file .cpcache/F6929CC9A17B2FF3D31EE7A6D061797C.main \
--manifest-file .cpcache/F6929CC9A17B2FF3D31EE7A6D061797C.manifest \
--config-data '{:deps {borkdude/deps.clj {:mvn/version "0.0.1"}}}'
what is that for?This is just dependency stuff that you would not normally see, but since you added the print thing you now see it
🙂 thanks. looked like something I didn't need. good to confirm.
I'm getting closer... Might have 1 or 2 more questions...
what does
do for the libsci example?
I can build libyamlscript.so
and it has my eval_ys_to_json
entrypoint, but I get
java.lang.ExceptionInInitializerError: null
at clojure.lang.Namespace.<init>(Namespace.java:34)
at clojure.lang.Namespace.findOrCreate(Namespace.java:176)
at clojure.lang.Var.internPrivate(Var.java:153)
at libyamlscript.core.<clinit>(null:-1)
at libyamlscript.Core.evalYsToJson(Core.java:18)
when I call it from python with:
#!/usr/bin/env python3
import sys
from ctypes import *
ys_input = sys.stdin.read()
print(ys_input)
libyamlscript = CDLL("./lib/libyamlscript.so")
isolate = c_void_p()
isolatethread = c_void_p()
libyamlscript.graal_create_isolate(None, byref(isolate), byref(isolatethread))
eval_ys_to_json = libyamlscript.eval_ys_to_json
eval_ys_to_json.restype = c_char_p
print(eval_ys_to_json)
result = eval_ys_to_json(isolatethread, c_char_p(bytes(ys_input, "utf8")))
print(result)
it allows you to do Java interop on those classes, if, you also include those classes in the SCI context
Trying to determine which options are required for native-image
currently only using
native-image \
--silent \
--no-fallback \
--shared \
-jar target/libyamlscript-0.1.0-standalone.jar \
-cp src \
-H:Name=/home/ingy/src/yamlscript/libyamlscript/lib/libyamlscript
right, when I use that the build blows up
I recommend using: https://github.com/clj-easy/graal-build-time
I can look into more detail tomorrow, I have dealt with quite a few of these problems myself, if you have any links to failing builds, etc. It's night time here now, so ttyl
thanks. have a good night. I'll leave stuff here as appropriate.