On Wed, Jan 16, 2013 at 9:13 AM, Dan Markham <[email protected]> wrote:
> A change like this to the public API. Would this cause every host  binding
> to *have* to be updated at the same time to support it?

Clownfish was recently changed to generate host bindings for all methods by
default, so long as it can figure out the type mapping.  The
delete_by_doc_id() method signature is simple, so as soon as we add it to
Indexer.cfh/Indexer.c it will automatically become usable from Perl (albeit
hidden).  In contrast, methods whose signatures include non-mappable types
such as `void*`, `int32_t*`, `char*`, must have bindings coded manually.

However, Clownfish will not generate host **documentation** by default for any
class or method -- because it's better to accidentally omit something from a
public API than it is to accidentally expose something.  Every symbol to be
documented must be whitelisted explicitly for each host.

This allows us to consider at leisure whether there might be a better host API
for a given method, rather than forcing us to consider the consequences of
making an API public across all hosts simultaneously the moment a method is
committed to core.

There is actually a lot of functionality in Lucy which is ostensibly public
at the Clownfish level but which is not exposed via Perl.  Most of the time
this is because a class is a work-in-progress and we're abusing the fact that
documentation will not be generated.  It would be good to clean those up so
that only stuff which really is public gets labeled as `public`.

Marvin Humphrey

Reply via email to