aysylu / loom

Graph library for Clojure. Mailing list https://groups.google.com/forum/#!forum/loom-clj
http://aysy.lu/loom/
887 stars 108 forks source link

AOT compliation error on 0.5.0 #39

Open sritchie opened 10 years ago

sritchie commented 10 years ago

Hey guys,

When I try to AOT a namespace that includes loom, I get the following error:

Caused by: java.lang.IllegalArgumentException: No implementation of method: :add-nodes* of protocol: #'loom.graph/EditableGraph found for class: loom.graph.BasicEditableDigraph
    at clojure.

Any idea what's going on? Have you guys seen this before?

Thanks!

fmjrey commented 10 years ago

Not sure if it will help, but try adding this line in your project.clj

:aot [loom.graph]

sritchie commented 10 years ago

I actually aot every namespace already.

fmjrey commented 10 years ago

AOT related errors are difficult to track down. In my case just aot loom.graph solved my problem, but your situation is entirely different and it's hard to comment any further without more details. If that may help understand your problem, I usually get this error on the REPL because somehow a protocol or record gets reloaded while some existing instances are kept active. Reloading protocols and records create new interfaces/classes which are not the same as the one from instances not reloaded.

hiredman commented 10 years ago

@sritchie are you see that error when running tests? do you see that error outside of running tests?

these kind of aot related errors generally come down to either stale class files or code reloading and various test suites do different kinds of code reloading that can cause problems, if you are use clojure.test in an older lein project lein used insert a :reload-all in to the ns form for tests which can easily cause this problem

sritchie commented 10 years ago

This popped up with a full clean, rm -rf target, lein clean, all of that. I built an uberjar with AOT compilation enabled for all namespaces, then tried to execute the uberjar with java jar. I backed off, but when I try to upgrade again I'll repro in a small project and send it on to you guys.

pataprogramming commented 8 years ago

@sritchie: Were you able to reproduce this issue after you upgraded?

sritchie commented 8 years ago

Hey Paul - not sure, unfortunately.

On Sun, Mar 20, 2016 at 10:13 AM Paul L. Snyder notifications@github.com wrote:

@sritchie https://github.com/sritchie: Were you able to reproduce this issue after you upgraded?

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/aysylu/loom/issues/39#issuecomment-198956034