Clojure assumes that clojure.lang.Compiler/LOADER is a DynamicClassLoader in a few places, but rules-clojure.persistentClassLoader is what's set to the ClassLoader instead. This causes the compilation step to fail. Compiling a namespace referencing a namespace containing (def foo (get-proxy-class ExceptionInfo)) should reproduce the error, with the message :cause class rules_clojure.persistentClassLoader cannot be cast to class clojure.lang.DynamicClassLoader (rules_clojure.persistentClassLoader is in unnamed module of loader 'app'; clojure.lang.DynamicClassLoader is in unnamed module of loader rules_clojure.persistentClassLoader @65ff29ae)
(note: for some reason I have to put that repro in b, and then compile a which :requires b)
~/src/github.com/clojure/clojure master*
❯ rg '\^.*DynamicClassLoader'
src/clj/clojure/genclass.clj
722: (.defineClass ^DynamicClassLoader (deref clojure.lang.Compiler/LOADER)
src/clj/clojure/repl/deps.clj
32: (.addURL ^DynamicClassLoader loader u)
src/clj/clojure/core_proxy.clj
293: (. ^DynamicClassLoader (deref clojure.lang.Compiler/LOADER) (defineClass pname bytecode [super interfaces]))))))
Clojure assumes that clojure.lang.Compiler/LOADER is a DynamicClassLoader in a few places, but
rules-clojure.persistentClassLoaderis what's set to the ClassLoader instead. This causes the compilation step to fail. Compiling a namespace referencing a namespace containing(def foo (get-proxy-class ExceptionInfo))should reproduce the error, with the message:cause class rules_clojure.persistentClassLoader cannot be cast to class clojure.lang.DynamicClassLoader (rules_clojure.persistentClassLoader is in unnamed module of loader 'app'; clojure.lang.DynamicClassLoader is in unnamed module of loader rules_clojure.persistentClassLoader @65ff29ae)(note: for some reason I have to put that repro in
b, and then compileawhich:requiresb)