[Grok-dev] solving the grok.template() bug - part A of the solution
faassen at startifact.com
Mon Jan 12 10:26:47 EST 2009
Jan-Wijbrand Kolman wrote:
> Additionally, the grok.context directive does things kinda different
> again since it has its own special UnambiguousComponentScope
> implementation. I think this a sign something somewhere needs to be
> factored a little better.
>  I tried to understand what exactly is going on there, but the
> seemingly simple code confuses the hell out of me. It seems to cover a
> particular edge case, but I cannot say what that egde case actually is...
It's indeed rather hard to understand. I'm just going to give you the
results of my reading in the hope things will help.
The goal of this code is to make sure that two things happen (in the
case grok.context() is missing on a class:
* give an error if there's also no grok.context() in the module
* give an error if auto-association happened (elsewhere, apparently),
but there are multiple possible contexts available.
I think we should be able to find a better hook for all of this indeed,
making the grok.context() specific code a lot smaller.
More information about the Grok-dev