clojure-emacs / refactor-nrepl

nREPL middleware to support refactorings in an editor agnostic way
Eclipse Public License 1.0
256 stars 69 forks source link

resolve-missing can specify the wrong `:type` #401

Closed vemv closed 11 months ago

vemv commented 11 months ago

Using (cljr--call-middleware-to-resolve-missing "Thread") returns the following for me:

(#s(hash-table size 2 test equal rehash-size 1.5 rehash-threshold 0.8125 data
               (:name sun\.jvm\.hotspot\.runtime\.Thread :type :ns))
   #s(hash-table size 2 test equal rehash-size 1.5 rehash-threshold 0.8125 data
                 (:name java\.lang\.Thread :type :class)))

...that :type :ns should be :type :class instead, otherwise clj-refactor will try to :require the class.

I'd say that this example shows two issues at once: