-
-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove reflection #51
Conversation
fix reflection
@alekcz Hi Alexander! I haven't used Graal and am not too familiar with it - could you please give some extra context?:
Thanks! |
Caveat: I'm no Graal expert or Java expert for that matter. All of the below is from reading and experimentation GraalVM context Another issue is that certain classes cannot be on the heap during compilation and should rather be initialised at runtime. SSL is a frequent offender. This was the reason for http-kit/http-kit#434. In terms of detecting reflection (these are learnings by trial and error):
|
I learnt today that the magic words are Source: https://stackoverflow.com/questions/4474341/where-can-i-specify-warn-on-reflection-in-a-clj-file |
Hi Alexander! Just to confirm that we're on the same page here: you're only seeing reflection in encore on Graal, right? Edit to add: there's some boxed math, but no reflection. |
@ptaoussanis yeah in Graal and only in with |
Okay, will need to try get Graal setup on my end. I don't understand why these calls would reflect.
So just to clarify: you didn't see the other forms reflecting, even on Graal? |
@ptaoussanis no I didn't see the other forms reflecting in Graal. I saw them when I used The easiest way I found is to just include The other approach is to write a main function that will touch all the parts of encore then compile with GraalVMs native-image creator. |
Okay, thanks for clarifying. I'm not familiar with lein cloverage or what it's trying to do- will need to try check that then as well. I'm not sure why it would suggest doing something like In any case, will try take a look when I get a chance! Cheers |
I'm closing this one. I've done absolutely nothing and the reflection has disappeared. And I can't get it to reappear. Thanks for all the effort and sorry for the trouble. |
No problem- thanks for following up! |
Change
Added type hints where the following are used:
No functionality has been edited
Effect
No more reflection type downstream, making encore graalvm friendly.
Why
The instances of reflection in
encore
are bubbling down into my lib.I'm hoping to make it compatible with graalvm so I've added type hints to
encore
so that the reflection is gone.