-
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
rename-file doesn't rename fully qualified function references #173
Comments
@expez: by any chance you'd like to give a go to this issue and perhaps other related work? With 622c210, renaming files is working again. I'm enjoying it already but I suspect there might be missing edge cases here and there e.g. metadata, Clojure's newer syntaxes for ns-qualified things, etc. Especially since only the updated rewrite-clj has proper support for some of those. Obviously it's just a suggestion, can give it a shot myself at some point. |
This is very likely!
I have very limited time for open source work lately, but we do get some time at work to spend on side projects. I've been trying to put that time into refactor-nrepl, but had to cut a new release for superstring last time around. Will def try to spend more time here. It's for sure more fun now that you're here breathing new life and enthusiasm into the project 🤗 |
🍻 thanks for the answer, let's see how it goes! |
I took a look at I'd look into integrating clojure-lsp's programmatic api, it doesn't involve running a lsp server at all so we save that complexity. see e.g. https://cljdoc.org/d/com.github.clojure-lsp/clojure-lsp/2021.11.02-15.24.47/api/clojure-lsp.api#rename! (that renames a symbol, not a file/dir) As mentioned in some other issue, it's a good idea to introduce a protocol so we all can use what we find best. |
After researching, clojure-lsp is right now bit of a dense dep to pull (it has lots of transitive deps). They're open to a modularization but probably it's not something to expect too soon. Which invited me to think, refactor-nrepl's In terms of false positives (refactored where it shouldn't have: comments, strings, quoted symbols maybe?), those are harder to parse against, OTOH discerning users will review refactor-nrepl's results. That's why VCS, unit tests etc exist :) So I'd keep/extend the current impl indefinitely, seems good to have something self-contained. Will give it a shot eventually if nobody else beats me to it 👀 |
Fixed in refactor-nrepl 3.3.2 / clj-refactor.el 3.3.2 |
I had a
with-redefs
in my test ns and when I moved the ns with the functions being mocked out the weren't renamed properly.The text was updated successfully, but these errors were encountered: