[Zope3-dev] Idea: Failure to lookup adapters

Christian Theune ct at gocept.com
Tue Jan 16 02:36:48 EST 2007


Am Montag, den 15.01.2007, 17:25 -0200 schrieb Sidnei da Silva:
> One of the most common issues that I've faced, and watched several
> people struggle with, during Zope 3 development is to figure why a
> certain adapter is not found, or why a certain other adapter is found
> instead of the one you are expecting.
> 
> I was wondering if there is something that could be done to help
> pinpoint this kind of issue, since adapters are really a key part of
> the component architecture.
> 
> One of the ideas that occurred me was that in debug mode we could
> create a wrapper around the to-be-returned adapter and stuff some
> trace information in there to help diagnose possible issues. Or maybe
> we could just use the logging framework to output some information.
> 
> The kind of info I'm looking for is something along the lines:
> 
>   'We've tried to look up an adapter for (ISomething, ITheOther) but
> none was found'
>   'Found an adapter for IFoo, which is a base class for the IBar
> interface requested. No adapter has been found for the most-specific
> interface IBar'


> 
> Comments?

Yes please. =)

I'd love some debugging support for that as well. I like the idea of a
log that gives you enough input to reason about what the CA did to
derive its decision.

In an advanced step, something interactive might be worthwhile to allow
poking into the registrations conveniently.

Christian

-- 
gocept gmbh & co. kg - forsterstraße 29 - 06112 halle/saale - germany
www.gocept.com - ct at gocept.com - phone +49 345 122 9889 7 -
fax +49 345 122 9889 1 - zope and plone consulting and development
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://mail.zope.org/pipermail/zope3-dev/attachments/20070116/a5379db0/attachment.bin


More information about the Zope3-dev mailing list