This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-07-07
Channels
- # aleph (10)
- # announcements (6)
- # architecture (23)
- # atom-editor (2)
- # beginners (35)
- # biff (5)
- # cljdoc (22)
- # clojure (14)
- # clojure-europe (18)
- # clojure-hungary (26)
- # clojure-nl (6)
- # clojure-uk (6)
- # clojurescript (39)
- # core-async (1)
- # data-science (14)
- # datascript (20)
- # datomic (4)
- # graalvm (18)
- # jobs-discuss (5)
- # keechma (1)
- # leiningen (4)
- # malli (3)
- # nbb (11)
- # nextjournal (2)
- # off-topic (1)
- # parinfer (1)
- # releases (1)
- # remote-jobs (3)
- # shadow-cljs (7)
- # sql (2)
- # xtdb (4)
Is there a way to have compile-time-only dependencies and code when building native images? I'd like to precompute some stuff that requires dependencies and code that I then don't use in the final build.
Sure. I'm extracting and precomputing some data from the commits in my repository using https://www.eclipse.org/jgit/
I need the data in the executable, but not the code to produce it
Maybe just spit that out as an .edn file and then include the .edn file as a resource?
though about it, but I'd rather not
when developing I want to be able to run the computation continuously
I mean, whenever I need it
and sticking it in a resource means I'd have to recompute/reload it manually
you could do it in a macro which runs at compile time and the compiled bytecode would contain the result
yeah that'd be ideal
but since eclipse git stuff probably uses security stuff, I'd expect that you would not be allowed to do this at build time, but worth a try
I'm wondering how I would actually structure my code so that the dependencies don't get pulled in
yeah, can't do that
if I make my macro call a function, will that function get compiled in?
i.e. would I have to stick all the code in the macro?
...and if I do that, would graalvm still build the jgit classes I (:include)
into the native image?