[Grok-dev] five.grok - what changed to break this?

sylvain at infrae.com sylvain at infrae.com
Sat Sep 27 11:01:15 EDT 2008


> sylvain at infrae.com wrote:
>

   Hello,

>>> That is, it was registering the 'static' resource directory adapter
>>> even
>>> when there was no 'static/' directory to be found!
>>>
>>
>>   It's done the same in Grok. I think that's if the developer wants to
>> add
>> a directory afterwards, he don't have to restart his instance.
>
> Really? That sounds dodgy if you ask me. Restarts are cheap. With this
> approach, we have one adapter for each and every package that gets
> grokked, even if only a small number are even used for templates and
> browser components.
>

  I agree to do so, and started to do it. But after thinking a while, I
think that five.grok should have exactly the same behaviour than grok
does. So grok do it like this, we should do it like this. This let
people learn Grok, and be able to use it Zope 2 (Plone, Silva) and Zope
3 with the same knownledge, without to known that's *under that
platform* so it's slightly different.



>>> I didn't break any tests with this change. I should've written a
>>> failing
>>> test to prove it, but I don't have time for that right now and I need
>>> my
>>> instance to start up. :)
>>>
>>
>>   Well, you didn't break any test, since tests are checking that there
>> is
>> an adapter for a static directory is registered, and it's the case, the
>> Zope 3 one, which don't work in Zope 2.
>
> Okay. Would you like me to revert?
>

   If you commited your fix, yes please. I use static directory to hold
resource file in Silva layout now, combined with five.resourceinclude
and a grokker it's quite powerful.

   But I still have to add test I think, in five.grok, so if you do the
change you did, this might break.


   Best regards,

   Sylvain,



More information about the Grok-dev mailing list