clj-commons / virgil

Recompile Java code without restarting the REPL
306 stars 21 forks source link

virgil interferes with proxy #26

Closed Engelberg closed 6 years ago

Engelberg commented 6 years ago

I posted on the clojure mailing list about a problem I was having with this minimal example, executed in a segmented namespace:

(definterface Interface (test []))
(def p (proxy [Object Interface] [] (test [] 1)))
(defn get-test [o] (.test ^Interface o))
(get-test p)

Someone reported that the problem was due to the lein-virgil plugin, which was causing Clojure to throw an error that p could not be cast to Interface. I have not confirmed for myself that virgil is the culprit, but am relaying the outcome of the discussion here.

Here's the thread: https://www.mail-archive.com/clojure@googlegroups.com/msg104426.html

ztellman commented 6 years ago

Virgil shouldn't be a problem here, since any namespace which references the given interface should be reloaded after recompilation, but it's possible there's some subtlety I'm not considering. Please do update the issue whenever you have confirmation this only fails when lein-virgil is being used.

Engelberg commented 6 years ago

Testing for myself, I see no evidence that it is caused by lein-virgil.