Return-Path: X-Original-To: apmail-incubator-lucy-dev-archive@www.apache.org Delivered-To: apmail-incubator-lucy-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CB6519756 for ; Sun, 11 Mar 2012 17:02:22 +0000 (UTC) Received: (qmail 24135 invoked by uid 500); 11 Mar 2012 17:02:22 -0000 Delivered-To: apmail-incubator-lucy-dev-archive@incubator.apache.org Received: (qmail 24072 invoked by uid 500); 11 Mar 2012 17:02:22 -0000 Mailing-List: contact lucy-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: lucy-dev@incubator.apache.org Delivered-To: mailing list lucy-dev@incubator.apache.org Received: (qmail 24062 invoked by uid 99); 11 Mar 2012 17:02:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Mar 2012 17:02:21 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.210.47] (HELO mail-pz0-f47.google.com) (209.85.210.47) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Mar 2012 17:02:15 +0000 Received: by dado14 with SMTP id o14so3202559dad.6 for ; Sun, 11 Mar 2012 10:01:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding :x-gm-message-state; bh=TkRsKqNVfvwPmBVwOxzOced/k3JdAwHAFQJIdJtjLBo=; b=kMCvgNdlHuioXpFkihanGTsexKAID+zHY602T4jkDt5vUcex6m2YonMlpI5nJt9Ril /g6cU33Pu5fKRvpONkpQvHra8dkKmw0Klzm3lqszFKzYPTnMgBo8QyulkVtLkB3+rcsH ykBQi3IoTfNqHpWX8L1BwkyOOyoVLHztXlqTnlOTqakcTLieY77W2a1c9B6cJJ7Fykzt bsfsLgkyw+0R2/U+lUGUkiKsWDVhIiuJ8bgDRGIsfzq3D4x2XtYEd3jOf3jLjo3OxDFX RnvMtdHmrMInU+av1TSZBiNyi+JN8xYoHFE9h875dkZJKSv+pHpdeH1DTbzQYUc63T0y DWfw== MIME-Version: 1.0 Received: by 10.68.216.132 with SMTP id oq4mr15170717pbc.41.1331485314836; Sun, 11 Mar 2012 10:01:54 -0700 (PDT) Received: by 10.142.170.12 with HTTP; Sun, 11 Mar 2012 10:01:54 -0700 (PDT) X-Originating-IP: [184.189.118.13] In-Reply-To: References: <20120224205425.GA16270@rectangular.com> <4F5A7AC8.1060806@aevum.de> Date: Sun, 11 Mar 2012 10:01:54 -0700 Message-ID: From: Marvin Humphrey To: lucy-dev@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQnEKVdn7T/WzGxi3u2gUjW4a+72ChivJQQCOkRCI6rmgS9lgZ7HP5+xKGlK/ti8cvHHSA6J X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [lucy-dev] Installing parcel.h and charmony.h 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. =A0If 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): > > =A0 =A0#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 organizations. * 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... $CLOWNFISH_INC/org/apache/Lucy/0.4.0/Lucy/Analysis/Analyzer.h $CLOWNFISH_INC/org/apache/Lucy/0.4.0/Lucy/Analysis/Normalizer.h [...] ... 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: $CLOWNFISH_INC/org/apache/Lucy/0/Lucy/Analysis/Analyzer.h $CLOWNFISH_INC/org/apache/Lucy/0/Lucy/Analysis/Normalizer.h [...] 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 distros. Marvin Humphrey [1] Our "per-class" header files are not technically per-class right now, though we could choose to start enforcing that.