Introduce buildout:zcml-additional-fragments buildout variable #10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a
buildout:zcml-additional-fragments
buildout variable that can be used to effectively extend the resultingzcml-additional
with+=
assignments.This is motivated by ZCML needed for
ftw.tika
:tika-server.cfg
currently includes[instance0] zcml-additional += ${tika:zcml}
While it's a nice idea that
tika-server.cfg
is completely self-configuring, I don't think this can work reliably:instance0:zcml-additional
often gets overridden in buildouts that extend from theftw-buildouts
.zcml-additional
needs to be wrapped in a single<configure />
element, appending to it from multiple places using+=
doesn't work.Therefore I suggest to remove that
zcml-additional += ${tika:zcml}
and instead document inREADME.rst
how to add tika's ZCML toinstance0:zcml-additional
in the buildout that extends fromtika-server.cfg
. That way its left to the developer to make sure the ZCML is included properly in whatever other additional ZCML he has in his buildout.This issue really should be fixed in
plone.recipe.zope2instance
I guess - always wrap the contents ofzcml-additional
in an outer<configure />
element if it contains more than one element.As a work-around, we do this in some of our buildouts:
buildout:zcml-additional-fragments
buildout:zcml-additional-fragments
from multiple places using+=
<configure />
node and setzcml-additional
to that:Maybe this pattern could also be useful in
ftw-buildouts
.@jone any thoughts on this?