On Tue, Nov 25, 2014 at 9:56 PM, Marvin Humphrey <[email protected]> wrote:

> I suggest that the parcel dirs in "include" directories be required to follow
> the naming convention "PARCEL-VERSION".  That will make it possible to know
> what parcels are available without having to parse every .cfp file.
>
> For "source" directories in contrast, any top-level dir could contain any one
> arbitrary parcel.

As noted earlier: Requiring that the contents within "include" directories
adhere to such strict naming conventions is fine for installers but unfriendly
to development.

So instead, how about applying this ruleset to every top level directory in
either "source" or "include"?

1.  If we can detect that a given directory follows the naming convention
    PARCEL-VERSION, extract the parcel name from the dir name.
2.  Otherwise look for a .cfp file at the top level.
3.  Otherwise, parse every Clownfish file in the tree.  There should be only
    one parcel specified.

I think this would allow us to form a unified array of search paths consisting
of all "source" dirs followed by all "include" dirs.  (Is there any reason we
need to continue distinguising between the "source" and "include" for
search-path purposes?)

An important use case is a minimal single-parcel project, which should be
possible using only a single directory and two loose files:

  core/MyProject.cfh   # declares `parcel com.example.foo`
  core/MyProject.c

On installation, the tool would assume version "0" in the absence of a parcel
file.

   _include/com.example.foo-0/
   _include/com.example.foo-0/MyProject.cfh

Sound sane?

Marvin Humphrey

Reply via email to