lucy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marvin Humphrey <>
Subject Re: [lucy-dev] Installing parcel.h and charmony.h
Date Sun, 11 Mar 2012 17:01:54 GMT
On Sat, Mar 10, 2012 at 11:34 AM, Marvin Humphrey
<> wrote:
> At some point in the future, we will probably break a bunch of stuff out
> of the Lucy parcel, creating Lucy::Test, individual LucyX parcels and so
> on.  If you had an extension that needed both Lucy and e.g.
> Lucy::Search::ProximityQuery, you would need one pound-include per
> parcel (*not* per class):
>    #include "Lucy.h" #include "Lucy/Search/ProximityQuery.h"

D'oh!  There were two mistakes in that code sample -- accidental line
rewrap, and putting ProximityQuery under "Lucy" instead of "LucyX".  It
should have read like this:

    #include "Lucy.h"
    #include "LucyX/Search/ProximityQuery.h"

> I'm not exactly sure how to deal with the namespace conflict between
> parcels and classes

OK, I think I've got it.  Here's a variant of the code sample above:

    #include "org/apache/Lucy/0/parcel.h"
    #include "org/apache/LucyX/Search/ProximityQuery/0/parcel.h"

This scheme avoids three kinds of conflicts:

    * Conflicts between Clownfish parcels and classes.
    * Conflicts between similarly named parcels published by different
    * Conflicts between major versions of the same parcel.  (Note that
      there is only a single digit for the version number.)

I see two possible techniques for how we could install the per-class
header files[1].

We can install into a per-version directory...


... and then symlink the version dir to the single-digit major API dir:

    $CLOWNFISH_INC/org/apache/Lucy/0  <-- points at e.g. ../0.4.0

The other possibility is to clobber the contents of the major version
dir when installing minor/bugfix/etc releases:


This has the advantage of compatibility with file systems that do not
support directory symlinks.

Regardless of which installation mechanism we choose...

  * The extension author only needs to know about major versions.
  * There is still only one include dir for all Clownfish-powered

Marvin Humphrey

[1] Our "per-class" header files are not technically per-class right now,
    though we could choose to start enforcing that.

View raw message