Hi Everyone,

I'm working on integrating the file attribute primitives in to the main
code during bootstrap.

Class methods for FileAttributesPluginPrims are written out as:



!FileAttributesPluginPrims classSide methodsFor: 'initialize' stamp: 'nil'!
reset
"Reload the masks"

Default := nil.! !


As you can see, the class name is written with "classSide" instead of
"class", resulting in the method quietly being ignored during file in.

This comes about in:


MCStWriter>>writeMethodPreamble: definition
    self chunkContents: [:str |
        stream bang.
        str nextPutAll: definition fullClassName;
            nextPutAll: ' methodsFor: ';
            nextPutAll: definition category asString printString;
            nextPutAll: ' stamp: ';
            nextPutAll: definition timeStamp asString printString
        ]


which calls:


MCMethodDefinition>>fullClassName
"Using #class selector for classes for backwards compatibility"

    ^ self classIsMeta
        ifFalse: [self className]
        ifTrue: [
            (self actualClass isNil or: [ self actualClass isTrait ])
                ifFalse: [self className, ' class']
                ifTrue: [self className, ' classSide']]



Because FileAttributesPluginPrims doesn't exist in the image (the code
is read in from the git repository and being written out to a .st file),
#actualClass returns nil, resulting in "classSide" being used instead of
"class".

I've never seen "classSide" used in chunk format.  Is there any time
"classSide" is valid, and any suggestions on how this should be fixed?
(My first thought is to just change MCStWriter>>writeMethodPreamble: to
only write "class").



Thanks,
Alistair

Reply via email to