Do you have dynamic 'require' statements? Why? Should prefer (ns (:require [])) in non-scripts.
As an alternative, if you want to ensure a sane state, I would suggest starting your app from an initialization namespace that requires all the namespaces you might want. On Thu, May 9, 2013 at 5:19 PM, Steven Degutis <sbdegu...@gmail.com> wrote: > In my app, sometimes a file containing a defmethod hasn't been > required yet by the time some other function calls the multi-method. > So naturally it throws an exception. > > But later, as the app continues to run, the file containing the proper > defmethod eventually gets required by another file. Then everything > works fine. > > The ugly solution is to require all possible implementations of a > multi-method in the file that calls it. But that feels like it defeats > the goal of polymorphism, to not have to know about concrete > implementors of an interface. > > Is there a better solution to this kind of race condition? > > -Steven > > -- > -- > 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. > > > -- -- 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.