Comment 7 for bug 636193

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 636193] Re: feature flags need to self document

On Fri, Jan 7, 2011 at 4:18 AM, Benji York <email address hidden> wrote:
> On Wed, Jan 5, 2011 at 6:01 PM, Robert Collins
> <email address hidden> wrote:
>> So a registry is one approach.
>>
>> Another is to scan the code for flag names that are used. I'm kindof
>> partial to this simply because of the strong schemaless design.
>
> I considered that approach.  A purely textual scan doesn't seem like it
> will work because we get a lot of testing related false hits.  Analysing
> the AST seems like it would suffer from the same problem.
>
> Do you have another approach or variant that would perform better?

Well, the only false hits we should expect are those testing feature
flags themselves - and they are blacklistable.

A registry would be ok - I don't want to dictate implementation - but
lets not make it hard to work with. Uhm, what does that mean? We
shouldn't have to make changes in lp.services.features when we use a
new feature flag; we shouldn't have to make changes in
lp.services.features when we add a new component to lp. we shouldn't
need to fiddle with zcml in those cases either.

Not too that the bug I filed asks for the scopes and flags to be
listed in API doc, *not* for runtime warnings or other such things.