Rationale in [], out-of-band comments in {}. For each part, we need to decide: - Where should the source be? Headers? {core/base/, core/base_ext/, core/base/Additions/, core/base/Extensions/, dev-libs/base_extensions/} - To what library should they be compiled? {Part of the normal -base library? Always or conditionally? If a new library, should -make automatically link with it when it links with base? If {so,not}, how would one get something to {not,} link with it?} - When should it be compiled and installed? {By default, as a part of core/base/? By default, as a part of core/? Only when explicitly asked for? If it's compiled by default, should it be optional?} - Where should the headers be installed? When should they be included? {Would the extensions go in the normal headers? Install in Headers/Foundation/? Headers/gnustep/base/? Would stuff use them automatically? (Ie. would the normal headers automatically include the extension headers?) Optional? (Controlled by the same -make variable as linking; enabling it causes the headers to include the extension headers and links with the extension library? (or the other way around))} - Should other parts of GNUstep use it? {(-gui? -back? dev-libs/*?)} Base is to consist of the following parts: * Part 1. OpenStep/OPENSTEP stuff Source: core/base/ (Source/, Headers/) Library: libgnustep-base Compiled: n/a Headers: System/Headers/Foundation/ Used by other parts: Yes [This is what -base is all about, after all. :)] * Part 2. "Essential extensions" Stuff that is __strictly__ necessary for the OpenStep/OPENSTEP to work. This might also include extensions in the form of hooks for further extensions (ie. extensions that are in the GNUstep additions or cocoa additions might need hooks in the core). [We want to keep the core libraries clean and close to OpenStep/OPENSTEP, but sometimes, extending it makes sense: - If implementing something requires some functionality internally, and it's generally useful, making it public makes sense. However, this requires freezing the interface. - Some cocoa or GNUstep additions might need hooks to be possible. - OpenStep/OPENSTEP isn't perfect, but that's ok. However, some things are rather ugly, and having a nicer interface (with a compatibility interface on top) makes sense. Sometimes, doing something like this can make things much easier. ] Source: core/base/ (Source/, Headers/) Library: libgnustep-base [Must be in the same place as #1 by definition.] Compiled: With core/base/, always. [Again, it's essential stuff, so there's no other choice here.] Headers: System/Headers/ Foundation/ for additions to existing classes, gnustep/base/ for new stuff. The additions to existing headers should be used by default, but there should be a define for turning them off (STRICT_OPENSTEP?). Used by other parts: Yes * Part 3. Cocoa-compatibility extensions Extensions that cocoa has introduced (and that don't _have_ to be in #2). However, slight behavioral changes to existing methods belong with #1/#2. [Many want GNUstep to be a cocoa-clone. That won't happen, but we can get pretty close in many areas. Behavioral changes that don't cause {large? any?} incompatibilities belong with #1/#2 because doing things differently would probably be messy and cause code duplication. New methods and classes go here. This allows those who want a stable -base to actually finish it and keep it stable, while those who really want to can track apple-mindless-feature-of-the-day here without causing problems for others. ] Source: core/base/Extensions/cocoa/ (Should not be core/base/? Should probably be in core/ somewhere so it's compiled and installed by default. core/base_ext/cocoa/ also seems reasonable.) [It should be in core/ so a default installation of core includes it. This way, we don't break compatibility with previous GNUstep versions, and GNUstep is cocoa-compatible by default (as cocoa-compatible as people bother to make it).] Library: libgnustep-base-extensions-cocoa. Linked by default, but disabled by a flag to -make (USE_COCOA_EXTENSIONS=no). [Retains compatibility with GNUstep, and what cocoa-compatibility we can get, but people who don't want to use it don't have to.] Compiled: With core/base/, by default. Headers: System/Headers/gnustep/extensions/cocoa/ (Foundation/) (Preferably not Headers/Foundation/. Included automatically by default, but disabled by some define (setting USE_COCOA_EXTENSIONS for something should cause -make to pass that flag in automatically).) [Same as above.] Used by other parts: No [ [Cocoa stuff is too volatile to trust, so other parts should refrain from using it. {If something really useful or reasonable is added, we might want to "adopt" it and move it to #4, although that means that we'll basically 'freeze' the interface and not track further apple changes.} ] * Part 4. GNUstep extensions All the stuff people want to add. {This should, imho, still be kept to a minimum.} [People often want to add new features to -base. This is acceptable, _to_a_point_ (or feeping creaturism will kill us). By putting these extensions here, those who want to add extensions can do so without bloating or causing problems for the core functionality. ] Source: (see #3.) core/base/Extensions/gnustep/ Library: libgnustep-base-extensions-gnustep Compiled: With core/base/, by default. Headers: (see #3) Headers/gnustep/extensions/gnustep/ (gnustep/base/). [most of #3 applies here] Used by other parts: {Not sure, but leaning slightly towards "Yes, but strongly discouraged.} Notes: "Include automatically" means that the proper #1 headers should include the headers that contain the extensions. Eg. Foundation/NSArray.h should have: #ifdef GNUSTEP_BASE_USE_COCOA_EXTENSIONS #include <...cocoa.../NSArray.h> {Need to figure out naming here. NSArray_cocoa.h?} #endif #ifdef GNUSTEP_BASE_USE_GNUSTEP_EXTENSIONS #include #endf where GNUSTEP_BASE_USE_COCOA_EXTENSIONS and GNUSTEP_BASE_USE_GNUSTEP_EXTENSIONS are set by -make when the extensions should be used. The magic to link with the correct libraries and include the correct headers is actually implemented in -base using the additional makefile system that -make provides. -make itself does not need to be modified.