This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-06-21
Channels
- # announcements (5)
- # babashka (81)
- # beginners (26)
- # calva (6)
- # cider (7)
- # clojure (26)
- # clojure-czech (1)
- # clojure-europe (19)
- # clojure-nl (4)
- # clojure-spec (5)
- # clojure-uk (21)
- # clojuredesign-podcast (2)
- # clojurescript (19)
- # conjure (6)
- # cursive (13)
- # datomic (2)
- # depstar (1)
- # editors (2)
- # graalvm (25)
- # honeysql (5)
- # jackdaw (4)
- # jobs (5)
- # lsp (8)
- # malli (13)
- # music (1)
- # polylith (3)
- # practicalli (1)
- # releases (1)
- # remote-jobs (2)
- # sci (10)
- # shadow-cljs (5)
- # sql (14)
- # tools-deps (25)
- # xtdb (65)
@borkdude: I was wondering if you’ve seen this:
Which looks to me like you can essentially generate the graal reflect configs etc and bundle them in library jars
This seems a fundamentally better way to do things
e.g. httpkit could just bundle that, rather than listing config for users to use in their README
hehe ok always one (thousand) step(s) ahead 🙂
lol 😆 if I had a dependency on http-kit right now I might just
@borkdude: So I’m thinking it would be nice for clojure graal library templates to bundle this sort of thing by default.
If every lib created by something like this: https://github.com/seancorfield/clj-new/blob/develop/src/clj/new/lib.clj
Included the META-INF/native-image/
as generated config that stated something like --initialize-at-build-time={{package-namespace}}
, then most clojure libraries (at least ones without interop) would work in graal apps out of the box with less burden on the app creator
yeah. on the other hand, it's brittle to assume that people are going to do this. I think I'll just add that little snippet to bb.edn here: https://github.com/borkdude/jayfu
also it's going to be tedious if every clojure maintainer should have to do this, for every new namespace. like documentation it's always going to be out of sync
yeah I agree we also need tooling… But is it really for every new namespace? Most libs are bundled with all their namespaces inside a common parent, so wouldn’t it be sufficient for most libs to just mention generate that at template instantiation time?
jayfu is new to me… If I’d known about this a month ago 😆
yeah, that's true, but still. only a small portion of Clojurians are using graalvm native-image so for many people this will just be something confusing maybe
I suspect DynamicClassLoader can be substituted to "do nothing" https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/DynamicClassLoader.java Perhaps that results in something useful
:thinking_face: Yeah just changing to use SecureClassLoader or URLClassLoader might be sufficient