Hi, I've been working lately on my first project (https://github.com/
budu/lobos) that use protocols. Up until now, it's been quite
infuriating, I can't stop getting seemingly random "No implementation
of method" exceptions and I really don't understand why.

For example here's what happened this morning. In this project I have
a Creatable protocol that contains only one method: create. It is
currently implemented by two records: Table and Schema. I realized I
hadn't updated the example in the readme file and while testing that
code it threw an error because I changed stuff yesterday and the
object passed to the create method was a function. I call it a second
time, after fixing (at the REPL) that mistake, and there was a bug in
my code when calling create on a MapEntry instead of a Table. I fixed
(in the file) that issue and after that all I get when trying out the
same call is "No implementation of method" for the Schema class. I
review the code (it should work), try stuff and here's the really
strange thing:

user> (create (schema :test {}) nil)
#:lobos.ast.CreateSchemaStatement{:cnx nil, :sname :test, :elements
()}
user> (create (sample-schema) nil)
; Evaluation aborted.
user> (type  (schema :test {}))
lobos.schema.Schema
user> (type (sample-schema))
lobos.schema.Schema

I wasn't able to narrow down what is the problem exactly. The only way
I found to fix that kind of problem is the kill the JVM and restart
the whole thing. This is just one example, a lot of similar situations
happened during the past few days. It may be related more to my
development environment or the way I'm using it. I'm using Clojure 1.2
and swank-clojure 1.2.1 in Emacs from which I connect to a swank
instance launched from Leiningen. I'm using the REPL to test my code
and after I've changed a file I use slime-eval-buffer. I wonder if
there's some general issues with this setup or advices on working with
protocols that can help me?

Thanks

-- 
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

Reply via email to