-
Notifications
You must be signed in to change notification settings - Fork 38
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 warnings #75
Remove reflection warnings #75
Conversation
Hi @alexander-yakushev, As soon as a new release of |
Hello Bruno! I understand that these warnings must be annoying, but could you please specify which sort of weird behaviors does it cause? Because basically, you've rewritten the reflection done by the Clojure compiler into a manual one, so nothing should really change in the resulting bytecode. |
I do have
This PR fixes the last warnings I see. the strange behaviour I see is that my buffer would jump to an apparently random buffer called "utils.clj" from another project when the evaluation triggers the reflection warning. It is very bizarre and I didn't manage to track the issue in cider-nrepl yet. |
Since you only want to get rid of the warnings here, not remove the reflection itself, it should be enough to put ;; Disable reflection warnings in this file because we must use reflection to
;; support both JDK8 and JDK9+.
(set! *warn-on-reflection* false) Want to do it in this PR or should I commit it on my own? |
adding the
What's your thought on this, do you prefer the current implementation on the one proposed here? |
Not really. See https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L7625. All legitimate ways to load a file (build tools, |
b3ba3ff
to
ea3f161
Compare
Great! I didn't know that. Thanks for pointing it out. |
Thank you! Published this fix in |
It removes the following annoying reflection warnings while using the cider-repl:
all test pass with JDK8 and JDK9+