GemTalk / Rowan

a new project/package manager for Smalltalk that supports FileTree and Tonel repositories, and is independent of Monticello and Metacello
MIT License
14 stars 7 forks source link

(v3) Multiple references to a required project from different components is NOT possible #902

Open dalehenrich opened 1 year ago

dalehenrich commented 1 year ago

In the Mole project, the required project Buoy is referenced from two components:

  1. Deployment component
  2. Tests component and the only way to be able to make this work is to create two separate project specs which results in two separate clones for the Buoy projects, not to mention to separate projects loaded into the image ...

The workaround is to use conditional attributes (see RowanSample9:spec_0066 for an example) ... but expecting all projects to use the same set of non-conflicting attributes has never been a long term solution to the problem....

At the moment, it seems that something like the following will make it possible to customize the project reference spec at the site of the reference:

RwSimpleProjectLoadComponentV2 {
    #name : 'Tests',
    #condition : 'common',
    #projectNames : [
        'Buoy' : {
                     'components' : [ 'Tests' ],
                     'customConditionalAttributes' : [ 'blue' [
         }
    ],
    #componentNames : [
        'Deployment'
    ],
    #packageNames : [
        'Mole-Tests'
    ],
    #comment : ''
}

Where the project ref is a dictionary of spec field values: components and customConditionalAttributes. These two fields look like the only real candidates at this writing.

When this change is applied, it will no longer be desirable to pass along customConditionalAttributes when required projects are loaded ... although we'll probably need to arrange to keep it around to maintain compatibility with v2 project structures...