GemTalk / Rowan

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

(v3) pre/post doits need to be written to .gs files #916

Closed AllenOtis closed 5 months ago

AllenOtis commented 6 months ago

For the new indexing subsystem in GemStone64 v3.? I need the ability to specify a doit that will be run after class creation and before compiling any methods for that class .

I need to execute Behavior >> _addInvariantClassVar:value: in the doit .

so that methods will contain optimized references to constants that are defined by class variables.

AllenOtis commented 6 months ago

Maybe this issue title should be "support for custom class initialization"

dalehenrich commented 6 months ago

Here's an example of pre/post load doits in a Rowan project. The doit is defined in a file in the doits directory in the components directory:

RowanSample9V3Class1 preLoadDoit: 2

and the association between the doit files and package(s) is declared in a component:

RwLoadComponent {
    #name : 'Core2',
    #preloadDoitName : 'doits/preloadDoit_Core2',
    #postloadDoitName : 'doits/postloadDoit_Core2',
    #projectNames : [ ],
    #componentNames : [ ],
    #packageNames : [
        'RowanSample9V3-Core2',
        'RowanSample9V3-Tests2'
    ],
    #comment : 'Second component for loading second package'
}
dalehenrich commented 5 months ago

After discussion with Allen we agreed that the required functionality can be achieved with the existing class initialization mechanism in Rowan ...