clojure-emacs / clj-refactor.el

A CIDER extension that provides powerful commands for refactoring Clojure code.
GNU General Public License v3.0
771 stars 111 forks source link

[Fix #537] Fail early in cljr-rename-symbol if narrowing is in effect #538

Closed rechvs closed 1 year ago

rechvs commented 1 year ago

Previously the function would report a successful renaming without actually having renamed anything (see #537).

rechvs commented 1 year ago

I tried to add a test, but make test results in

cask exec buttercup -L . Warning (emacs): clj-refactor.el:78: First line is not a complete sentence ... Failing due to checkdoc warnings... make: *** [Makefile:35: unit-tests] Error 1

even when executed in the master branch, so I had no way of knowing whether my test would have actually worked. Is this expected? Or am I misinterpreting the output?
(Taking the risk of stating the obvious here:) It would be nice if the CircleCI checks would work again, so I could compare my local setup with the CI one to find out what’s causing the tests to fail on my machine.

Nevertheless thanks a lot for your work on this project. :heart: After working with IntellIJ IDEA for quite some time now, I’ve really grown fond of its refactoring capabilities, so cljr-rename-symbol in particular is a real godsend.

vemv commented 1 year ago

Thanks much!

I'll check what's going on with CI as soon as I have the chance.

bbatsov commented 1 year ago

Won't it be better to just ignore the narrowing instead?

rechvs commented 1 year ago

Won't it be better to just ignore the narrowing instead?

As I said in #537: that would also be my preferred option. But I’m of course in no position to decide whether that’s the way forward.

vemv commented 1 year ago

This commit is into the 3.7.0 release and will be visible in MELPA/etc within a couple hours.

Thanks!