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

Refactor to support magic namespace require with language context annotation #522

Closed dgtized closed 2 years ago

dgtized commented 2 years ago

Per my comment in https://github.com/clojure-emacs/clj-refactor.el/pull/521#issuecomment-1179577092, this PR makes no changes in the current behavior, but extracts and breaks up the current logic to facilitate using a defcustom in a later PR to select the magic require logic. In addition, it adds test coverage for each the methods extracted. My intention is to rebuild the changes in #521, as a sequence of commits on top of this. My hope is if this is merged, we can introduce a defcustom feature flag inside of cljr-slash, that will re-use some of these helpers but will otherwise be an independent change.

For review, I would recommend going through the first 3 commits step by step as they are clean changes, everything after I can squash as a single commit if preferred as they are just adding test coverage to the extracted methods.

Thanks in advance for your review!


Before submitting a PR make sure the following things have been done (and denote this by checking the relevant checkboxes):

Thanks!

vemv commented 2 years ago

Thanks much for the splitting! I'll review tomorrow-ish

dgtized commented 2 years ago

I believe I addressed all concerns in the latest push. Let me know if anything else needs to be addressed.

vemv commented 2 years ago

Excellent!