So it turns out this is an ordering problem. I worked around it by first compiling the namespace containing the protocol, and then the namespace using it. I guess there's a bug in the transitive compilation.
Cheers, Colin On 3 May 2014 21:52, Colin Fleming <colin.mailingl...@gmail.com> wrote: > Hi all, > > I'm having a strange problem when AOT compiling some code I just added. I > have a namespace that, amongst other things, returns qualified names of > things: > > (ns plugin.names > ...) > > (defprotocol QualifiedNamed > (qualified-name ^String [this])) > > (extend-protocol QualifiedNamed > nil > (qualified-name [this] nil) > PsiClass > (qualified-name [this] (.getQualifiedName this)) > ... etc etc ... > Object > (qualified-name [this] nil)) > > Now, when I require this namespace and try to use it, I get a failure > during AOT compilation via Ant of the using namespace: > > java.lang.NoClassDefFoundError: plugin/names/QualifiedNamed > at plugin.lookup__init.load(Unknown Source) > at plugin.lookup__init.<clinit>(Unknown Source) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:270) > Caused by: java.lang.ClassNotFoundException: plugin.names.QualifiedNamed > at java.net.URLClassLoader$1.run(URLClassLoader.java:366) > at java.net.URLClassLoader$1.run(URLClassLoader.java:355) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:354) > > However when I compile this same code within Cursive, it works, even from > a clean build. I assumed this was some kind of ordering issue of the > compiled namespaces, but shouldn't transitive compilation take care of that? > > Cheers, > Colin > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.