-
Notifications
You must be signed in to change notification settings - Fork 69
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
Setting *warn-on-reflection* prevents symbol renaming #347
Comments
Also when simply launching CIDER repl with jack in I see this in the
for every namespace where I set this var. When working with GraalVM this setting is very handy and I would like to keep it. |
Although popular, Furthermore tldr it's not an ideal mechanism. What can you use instead:
We're using Eastwood as a reflection linter in most https://github.com/clojure-emacs projects as a hard check in CI and it's working nicely for us. It has advantages over a simple grep laid out in its documentation. (I'm biased though because I authored it) |
Tries reproducing https://github.com/clojure-emacs/clj-refactor.el/issues/485 `find-symbol` seemed to lack test coverage anyway.
I've (unsuccessfully) tried to reproduce the issue here #325 Feel free to hack it, you might be able to break the build with a sophisticated-enough example :) |
Tries reproducing https://github.com/clojure-emacs/clj-refactor.el/issues/485 `find-symbol` seemed to lack test coverage anyway.
Tries reproducing https://github.com/clojure-emacs/clj-refactor.el/issues/485 `find-symbol` seemed to lack test coverage anyway.
I can confirm this happens here as well. It was is a legacy thing that need to be removed. I resolved by removing all the instances of |
I'll see if I can add a temporary binding for |
Maybe it's worth adding all Clojure's special variables that can be set with |
Cheers yes there's similar tech in eastwood https://github.com/jonase/eastwood/blob/8a6655f592004a7d6e028380144cb1210bb7a9f5/src/eastwood/analyze_ns.clj#L422-L435 Although it's not as easy as a |
Just ran into this as well. My workaround was to find and replace all
|
@filipesilva Sorry, I missed your message. I find that clj-kondo recommendation a bit odd. You don't really need to litter clojure namespaces with that flag. You can simply lint for reflection with Eastwood, Leiningen, certain Clojure CLI tools. Anyway I could give this a try again. |
Expected behavior
Symbol renamed
Actual behavior
Steps to reproduce the problem
I've created a simple clojure file with
(set! *warn-on-reflection* true)
on top and tried renaming the symbol.Environment & Version information
clj-refactor.el version information
clj-refactor 2.5.1, refactor-nrepl 2.5.1
CIDER version information
;; CIDER 1.1.0snapshot, nREPL 0.8.3
;; Clojure 1.10.3, Java 11.0.10
Leiningen or Boot version
Leiningen 2.9.3 on Java 11.0.10 OpenJDK 64-Bit Server VM
Emacs version
GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.13, cairo version 1.16.0) of 2021-03-17
Operating system
Fedora 33
The text was updated successfully, but these errors were encountered: