[Zope-CMF] GenericSetup: Apply profile dependencies only once

Maurits van Rees m.van.rees at zestsoftware.nl
Tue Sep 29 17:42:05 CEST 2015


Op 29-09-15 om 15:24 schreef yuppie:
> Hi Maurits,
>
> Maurits van Rees wrote:
>> But in the tests I explicitly test what would happen if the base profile
>> itself has a dependency, although this makes no sense to me.  In this
>> case the base profile would be the second in the chain.
>
> why are you testing features that don't make sense to you? Are the names
> BASE and EXTENSION not clear enough? Why would someone expect that you
> can use an EXTENSION profile as the base and extend it with a BASE profile?

What does not make sense to me, may still make sense to you or someone 
else.  One reason for adding tests is seeing what happens not in the 
normal mode that we design this for, but in corner cases.

The test is also an easier way to mimic another corner case.  When 
extension profile A extends both base profile B and extension profile C, 
the base profile B can end up on the second spot in the chain.  So I'd 
like to have a test that covers this.  Mostly, I don't actually care 
that much what exactly happens in this case, as long as this does not 
result in a traceback.  Which we now know.

> Why should we purge the versions if the code that purges the old
> configuration is never reached?
 > (...)
 > Your updated pull request still purges versions if we depend on a base
 > profile, but don't (re-)apply it. That's not what I would expect.

Ah, right, I overlooked this possibility in your earlier message.  I 
have now moved the version purging after the BeforeProfileImportEvent, 
as you suggested.

Cheers,

-- 
Maurits van Rees: http://maurits.vanrees.org/
Zest Software: http://zestsoftware.nl



More information about the Zope-CMF mailing list