Hi Jim, I'm sorry I can't really be more specific. I tried to duplicate the problems with a few simple steps, but they only seem to turn when things get complicates, e.g. involve different namespaces etc. I now even encountered a third problem which I think is related to the other two because it involves caching of protocol functions:
- In namespace 1, I define and create a record, say R, that implements a protocol P as defined in namespace 2. - In a third namespace I call a method called "classes" of protocol P on record R, i.e. I evaluate "(classes R)". Clojure then complains with "IllegalArgumentException No implementation of method: :classes of protocol: #'sentiment.protocols/ClassifierP found for class: sentiment.classification.client$fn__1479 clojure.core/-cache-protocol-fn (core_deftype.clj:527)". - when I evaluate "(classes R)" in namespace 1 (of R), no exception is raised Both namespaces A and C use namespace B. Op woensdag 27 februari 2013 17:19:33 UTC+1 schreef Jim foo.bar het volgende: > I'm not sure I fully understand the problem but I'll do my best to > guess... > > 1) are you sure you're using the protocol or are you actually trying to > define a method in the interface that the protocol generates? Try fully > qualifying the name of you protocol at the extension point... > > 2)Do your protocols exist in a separate namespace? Are you reloading the > namespace after making changes? > > Could you provide a minimal example of the problem? I've been using > protocols quite heavily lately and I do remember some of these issues > but I can't pinpoint your exact problem... > > Jim > > ps: are you by any chance trying to create 'mixins'? If yes remember > that for a protocol to be fully populated , it must be extended fully > per individual type (quote from the JOy of Clojure) > > > On 27/02/13 15:48, Joachim De Beule wrote: > > Hi all, > > > > I'm doing interactive development with emacs+clojure-mode+nrepl and > > I'm experiencing some seriously annoying problems with protocols and > > records implementing the protocols: > > > > 1) When I redefine a protocol by adding a method to it, and then > > re-implement a record according in accordance to the changed protocol, > > clojure complains that it cannot implement a method not in the > > protocol/interface. > > > > 2) when I change a protocol method in an existing record (e.g. by > > simply adding a println statement) the changes do not have any effect. > > > > These problems persist even when I do an nrepl-restart or close emacs > > and restart. Any ideas? > > > > Joachim > > -- > > -- > > You received this message because you are subscribed to the Google > > Groups "Clojure" group. > > To post to this group, send email to clo...@googlegroups.com<javascript:> > > Note that posts from new members are moderated - please be patient > > with your first post. > > To unsubscribe from this group, send email to > > clojure+u...@googlegroups.com <javascript:> > > 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+u...@googlegroups.com <javascript:>. > > For more options, visit https://groups.google.com/groups/opt_out. > > > > > > -- -- 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/groups/opt_out.