Assuming there is a file src/clojure/name/myns.clj that looks like this in a maven module
(ns name.myns
(:import ....
[my_package MyJavaClass]))
(def my-field (.myMethod (MyJavaClass.)))
I get the following error:
Error:clojure: java.lang.reflect.InvocationTargetException, compiling:(myns.clj:X:Y)
every time I edit myns.clj
where X:Y point to the my-field declaration.
The same code compiles fine with mvn from the command line. It may be important to note that La Clojure has the exact same behavior.
The workaround is to go to the clojure compiler settings and select "Don't compile Clojure namespaces", compile the project, and then restore the compiler settings. It makes little sense that after doing that the compiler no longer fails with the above error and everything works until I edit the file again.
Assuming there is a file src/clojure/name/myns.clj that looks like this in a maven module
I get the following error:
Error:clojure: java.lang.reflect.InvocationTargetException, compiling:(myns.clj:X:Y)every time I edit myns.clj
where X:Y point to the my-field declaration.
The same code compiles fine with mvn from the command line. It may be important to note that La Clojure has the exact same behavior.
The workaround is to go to the clojure compiler settings and select "Don't compile Clojure namespaces", compile the project, and then restore the compiler settings. It makes little sense that after doing that the compiler no longer fails with the above error and everything works until I edit the file again.