This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-06-16
Channels
- # admin-announcements (1)
- # announcements (1)
- # babashka (130)
- # beginners (120)
- # calva (11)
- # cider (5)
- # clj-kondo (9)
- # cljsrn (17)
- # clojure (63)
- # clojure-australia (1)
- # clojure-canada (21)
- # clojure-europe (37)
- # clojure-israel (4)
- # clojure-uk (6)
- # clojurescript (170)
- # conjure (5)
- # core-async (23)
- # cursive (16)
- # datomic (4)
- # defnpodcast (1)
- # emacs (5)
- # fulcro (1)
- # gis (2)
- # graalvm (31)
- # graphql (4)
- # helix (6)
- # honeysql (16)
- # jobs-discuss (3)
- # juxt (1)
- # lsp (7)
- # malli (20)
- # meander (12)
- # missionary (6)
- # off-topic (50)
- # pathom (4)
- # re-frame (4)
- # react (1)
- # ring (2)
- # shadow-cljs (63)
- # spacemacs (2)
- # sql (15)
- # testing (6)
- # vim (8)
- # xtdb (7)
If I discover reflective access calls with native-image-agent and with config-merge-dir
set (so I can instrument multiple inputs) is there an equivalent to config-merge-dir
to merge the trace files necessary for a modified refl to run?
@rickmoynihan I think trace files are just a vector of things, so you could just append them?
yeah was just going to say essentially that
Happy to help; but I guess the reason it’s not a library is because it’s not obvious how to extract the reusable bits from a specific build just yet
Right now I’m thinking it might be better to split the run into two phases. 1. a task to generate merged reflect configs with merge-dir set 2. a task to generate separate trace files 3. a final task that generates the cleaned config by iterating over each trace-file
correct, molding this into a library would be too soon as it's probably project-specific how to use this
:thumbsup:
You can use config-merge-dir
without that
The native image configure tool doesn’t appear to work without building with mx though
Though tbh I’m not entirely sure what that tool is, or what it means
but I’ve used config-merge-dir
just fine before
i.e. just set that, run the process a bunch of time with different inputs; then compile to a native image as normal with a merged reflection config; and all the reflective calls for those inputs are bottomed out properly. (With lots of false positives though — hence why I need your refl stuff! 🙂 )
@rickmoynihan but how do you merge the configs?
Simply run multiple times with this:
-agentlib:native-image-agent=config-merge-dir=nativecfg
instead of this:
-agentlib:native-image-agent=config-output-dir=nativecfg
it’s very handy
by the way I’m really enjoying using the bb task runner, it’s really, really nice! 🙇
refl made me finally bite the bullet and start using it for this project
@borkdude: FYI I’ve just modified my usage of refl to do all of the above and I can confirm it works a charm! 🎉 concat traces and merge configs. I’m going afk for a few days though; but if you’re interested I’m happy to discuss pushing back the refactorings necessary, when I’m back next week. Though it’s not really very complicated.
Mainly just moving responsibilities around
Decided to do this, this evening, I’ve backported most of the changes I made to my project into refl for you. I’ll probably not be able to revise the PR until early next week though https://github.com/borkdude/refl/pull/2 Thanks again for everything 🙇 I hope you find this useful.
I think invoking the code with different main arguments will fail for some complex apps. Maybe integration with https://github.com/FieryCod/clojure-graalvm-agent-helper? I do already have the power of refl mixed graalvm-agent-helper, and the results are promising. On the other hand, maybe it's too early to automate the process since not all false positives have been discovered?
@borkdude Would you be interested in resource trimming patch?