I have some. Been doing RN since 2016 or so. Also been doing a bit more Swift/Obj-C native dev in combination with RN last couple of weeks.
What can I do to help/participate?
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
if you have improvements to refl, feel free to raise PRs
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
I was more thinking of improvements to filtering out false positives
the merge stuff afaik isn't available in the readily available distribution
only when you build yourself with
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! 🙂 )
@borkdude: FYI this ⬆️ does seem to work; it’s a possible improvement I could issue a PR if you’re interested.
yeah, I think that makes sense. There is already a
classpath task as well in the
which we should feed into this script probably instead of hardcoding it
funny you should mention that; that’s exactly what I did 🙂
but I did it in my project, not your repo.
Simply run multiple times with this:
instead of this:
so it just merges the existing configs in the nativecfg dir with existing ones?
I didn't know that
it’s very handy
by the way I’m really enjoying using the bb task runner, it’s really, really nice! 🙇1🙂
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
@rickmoynihan yes please :)1👍
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?
@raspasov. It would be great to double check that the https://github.com/phronmophobic/mobiletest 1) works , 2) is easy to follow. I've done mobile development, but mostly objective-c/c++ for games. It would great to get your take on what kind of GUI API you think would make sense (clj bindings for SwiftUI?, UIKit, something else?). I'd also like to know what you think of React Native generally. One interesting strategy would be to create bindings to the https://github.com/facebook/react-native/tree/master/ReactCommon of React Native. Maybe it's worth creating a new slack channel to discuss?
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.