Brian Craft writes:
Hi Brian,
> The cast error, however, persists. It's something to do with reloading
> the namespace with the defrecord.
Ah, yes, I've had that, too, even without AOT compilation. Basically,
you simply cannot reload/recompile protocols, deftypes, definterfaces,
and defrecords
I have a wonky work-around. The file that is aot compiled depends on the
file with the defrecord reference. I eliminated the direct dependency and
exported a function that does an alter-root-var. So the provider injects
the required value into the dependent.
On Wednesday, July 16, 2014 9:33:52
That does, in fact, fix the compile issue. Thanks!
The cast error, however, persists. It's something to do with reloading the
namespace with the defrecord. Once it happens, it takes a "lein clean" to
clear. After that it works w/o error until the namespace is reloaded. It's
something to do with
Try fully qualifying the class name in the return type hint.
Might be the same symptom as in this ticket:
http://dev.clojure.org/jira/browse/CLJ-1232
Andy
On Wed, Jul 16, 2014 at 7:18 PM, Brian Craft wrote:
> Apparently this is due to a class loader problem.
>
> I moved it into a different fi
Apparently this is due to a class loader problem.
I moved it into a different file to try to avoid the problem. However I'm
now finding that nothing referencing foo will compile, throwing this error:
CompilerException java.lang.IllegalArgumentException: Unable to resolve
classname: PStatement
Trying to eliminate a reflection warning, I put a type hint on a function,
like
(defn foo ^PStatement [] ...)
which compiles without the reflection warnings, but at run time I get
ClassCastException java.lang.ClassCastException: cavm.h2.PStatement cannot
be cast to cavm.h2.PStatement
What doe