[Zope3-dev] RFC: remove 'directive' directive
R. David Murray
bitz@bitdance.com
Wed, 6 Nov 2002 12:15:24 -0500 (EST)
I'm just about ready to merge my 'metameta' branch. I'd like to
merge it before starting to backport the documentation Steve wrote
into the meta.zcml files. And I'd like to get my changes in before
Jim starts to work on having the registry retain more metadata,
since my code may be useful in that regard.
I'm afraid I did things backwards, and am only now writing the unit
tests (my makezcmldocs program was my operational test harness).
In the process of doing that something that I'd kind of noticed
before but had accepted has been smacking me in the face. I
started to try to factor the existing unit tests so I could reuse
the various directive tests in my own unit tests. In doing this,
I realized that the existence of the 'directive' directive reults
in a fair amount of redundent and complexifying code in the
configuration system. The tests for the two are almost-but-not-quite
identical, and factoring the tests to unify them is a bit of a pain.
I stuck a 'raise "Debug"' into the Directive handler, and it did
not trigger. So I conclude that so far no one has felt any desire
to use the directive directive. So I propose that we eliminate it.
The small amount of extra zcml verbiage that would be required for
the case of defining a single directive is trivial compared to the
benefit of eliminating redundent code in the configuration system
in my opinion.
Thoughts? Votes?
--RMD