instaparse icon indicating copy to clipboard operation
instaparse copied to clipboard

Set global *warn-on-reflection* = true

Open alexei-matveev opened this issue 6 years ago • 4 comments

Now that Instaparse is reflection-free maybe consider adding this flag?

https://clojuredocs.org/clojure.core/warn-on-reflection

I am not quite sure how far the side effects can go.

alexei-matveev avatar Dec 18 '18 20:12 alexei-matveev

I guess the question is whether this would set the flag for all projects using instaparse, or only when you start the repl in the environment created by this particular project.clj file. I don't know the answer to that offhand.

I used to keep the warn-on-reflection flag set in my own personal profiles.clj, so it was easy to catch issues in instaparse as I developed a tested it, but many other libraries I used generated lots of warnings, which got annoying so I turned it off. I intended to turn it back on before testing and pushing each build, but it looks like I forgot to do so for 1.9.

Engelberg avatar Dec 18 '18 20:12 Engelberg

Yes, not clear what is better. BTW, you can build native binaries from Instaparse. Just tried this:

https://github.com/alexei-matveev/instaparse-demo

alexei-matveev avatar Dec 18 '18 20:12 alexei-matveev

That's exciting work! I haven't had the opportunity to do much with graal, but it's amazing to see it in action. What did you have to install to be able to build the native-image?

Engelberg avatar Dec 18 '18 20:12 Engelberg

Only GraalVM which is another JDK of ~250M compresse, https://github.com/oracle/graal/releases

The compiler is in the bin/ subdir of the archive. It is still not quite ready for the prime time though. I updated the README too.

alexei-matveev avatar Dec 18 '18 21:12 alexei-matveev