The probably largest change is that the instvar classComment is no longer guaranteed to be either nil or a RemoteString, but can also be a String or Text. I hope I haven't missed any other user. Otherwise, I'd be happy to merge this.<br>
<br>
Best,<br>
Christoph<br>
<br>
<font color="#808080">---<br>
</font><font color="#808080"><i>Sent from </i></font><font color="#808080"><i><a href="https://github.com/hpi-swa-lab/squeak-inbox-talk"><u><font color="#808080">Squeak Inbox Talk</font></u></a></i></font><br>
<br>
On 2022-04-02T10:21:26-07:00, tim@rowledge.org wrote:<br>
<br>
> Looks pretty good to me; I must confess I didn't think of class comments when I added the original "save no source" thing.<br>
> <br>
> > On 2022-04-02, at 4:04 PM, commits at source.squeak.org wrote:<br>
> > <br>
> > A new version of Kernel was added to project The Inbox:<br>
> > http://source.squeak.org/inbox/Kernel-ct.1455.mcz<br>
> > <br>
> > ==================== Summary ====================<br>
> > <br>
> > Name: Kernel-ct.1455<br>
> > Author: ct<br>
> > Time: 2 April 2022, 6:03:46.669052 pm<br>
> > UUID: d86c9223-8db7-e541-96bd-cde0c9b7fb92<br>
> > Ancestors: Kernel-ul.1454<br>
> > <br>
> > Proposal: Adds basic support for #acceptsLoggingOfCompilation to class comments by allowing strings in BasicClassOrganizer.classComment. With this change, installing updates in a read-only image becomes more feasible. Please review.<br>
> > <br>
> > =============== Diff against Kernel-ul.1454 ===============<br>
> > <br>
> > Item was changed:<br>
> >  ----- Method: BasicClassOrganizer>>classComment (in category 'accessing') -----<br>
> >  classComment<br>
> >      classComment<br>
> >          ifNil: [^ ''].<br>
> > +     (classComment isString<br>
> > +             or: [classComment isText])<br>
> > +         ifTrue: [^ classComment].<br>
> > +     ^ classComment text<br>
> > +         ifNil: ['']!<br>
> > -     ^ classComment text ifNil: ['']!<br>
> > <br>
> > Item was changed:<br>
> >  ----- Method: BasicClassOrganizer>>classComment:stamp: (in category 'accessing') -----<br>
> >  classComment: aString  stamp: aStamp<br>
> > +     "Store the comment, aString, associated with the object that refers to the receiver. PRIVATE!! Clients should use aClass classComment: instead."<br>
> > -     "Store the comment, aString, associated with the object that refers to the receiver."<br>
> > <br>
> >      self commentStamp: aStamp.<br>
> >      (aString isKindOf: RemoteString) <br>
> >          ifTrue: [classComment := aString]<br>
> >          ifFalse: [(aString == nil or: [aString size = 0])<br>
> >              ifTrue: [classComment := nil]<br>
> >              ifFalse:<br>
> > +                 [classComment := aString]]<br>
> > -                 [self error: 'use aClass classComment:'.<br>
> > -                 classComment := RemoteString newString: aString onFileNumber: 2]]<br>
> >                  "Later add priorSource and date and initials?"!<br>
> > <br>
> > Item was changed:<br>
> >  ----- Method: BasicClassOrganizer>>commentRemoteStr (in category 'accessing') -----<br>
> >  commentRemoteStr<br>
> > +     ^ (classComment isKindOf: RemoteString)<br>
> > +         ifTrue: [classComment]!<br>
> > -     ^ classComment!<br>
> > <br>
> > Item was changed:<br>
> >  ----- Method: BasicClassOrganizer>>fileOutCommentOn:moveSource:toFile: (in category 'fileIn/Out') -----<br>
> >  fileOutCommentOn: aFileStream moveSource: moveSource toFile: fileIndex<br>
> >      "Copy the class comment to aFileStream.  If moveSource is true (as in compressChanges or compressSources, then update classComment to point to the new file."<br>
> >      | fileComment |<br>
> > +     self hasNoComment ifTrue: [^ self].<br>
> > +     <br>
> > +     aFileStream cr.<br>
> > +     fileComment := RemoteString<br>
> > +         newString: self classComment<br>
> > +         onFileNumber: fileIndex<br>
> > +         toFile: aFileStream.<br>
> > +     moveSource ifTrue: [classComment := fileComment].!<br>
> > -     classComment ifNotNil: <br>
> > -             [aFileStream cr.<br>
> > -             fileComment := RemoteString newString: classComment text<br>
> > -                             onFileNumber: fileIndex toFile: aFileStream.<br>
> > -             moveSource ifTrue: [classComment := fileComment]]!<br>
> > <br>
> > Item was changed:<br>
> >  ----- Method: BasicClassOrganizer>>moveChangedCommentToFile:numbered: (in category 'fileIn/Out') -----<br>
> >  moveChangedCommentToFile: aFileStream numbered: fileIndex <br>
> >      "If the comment is in the changes file, then move it to a new file."<br>
> > <br>
> > +     (self commentRemoteStr ~~ nil and: [classComment sourceFileNumber > 1]) ifTrue: <br>
> > -     (classComment ~~ nil and: [classComment sourceFileNumber > 1]) ifTrue: <br>
> >          [self fileOutCommentOn: aFileStream moveSource: true toFile: fileIndex]!<br>
> > <br>
> > Item was changed:<br>
> >  ----- Method: ClassDescription>>classComment:stamp: (in category 'fileIn/Out') -----<br>
> >  classComment: aString stamp: aStamp<br>
> >      "Store the comment, aString or Text or RemoteString, associated with the class we are organizing.  Empty string gets stored only if had a non-empty one before."<br>
> > <br>
> > -     | ptr header file oldCommentRemoteStr |<br>
> >      (aString isKindOf: RemoteString) ifTrue:<br>
> >          [SystemChangeNotifier uniqueInstance classCommented: self.<br>
> >          ^ self organization classComment: aString stamp: aStamp].<br>
> > <br>
> > +     self acceptsLoggingOfCompilation<br>
> > +         ifTrue:<br>
> > +             [| ptr header file oldCommentRemoteStr |<br>
> > +             oldCommentRemoteStr := self organization commentRemoteStr.<br>
> > +             (aString size = 0) & (oldCommentRemoteStr == nil) ifTrue:<br>
> > +                 ["never had a class comment, no need to write empty string out"<br>
> > +                 ^ self organization classComment: nil].<br>
> > +     <br>
> > +             ptr := oldCommentRemoteStr ifNil: [0] ifNotNil: [oldCommentRemoteStr sourcePointer].<br>
> > +             SourceFiles ifNotNil: [(file := SourceFiles at: 2) ifNotNil:<br>
> > +                 [file setToEnd; cr; nextPut: $!!.    "directly"<br>
> > +                 "Should be saying (file command: ''H3'') for HTML, but ignoring it here"<br>
> > +                 header := String streamContents: [:strm | strm nextPutAll: self name;<br>
> > +                     nextPutAll: ' commentStamp: '.<br>
> > +                     aStamp storeOn: strm.<br>
> > +                     strm nextPutAll: ' prior: '; nextPutAll: ptr printString].<br>
> > +                 file nextChunkPut: header]].<br>
> > +             self organization classComment: (RemoteString newString: aString onFileNumber: 2) stamp: aStamp.<br>
> > +             file ifNotNil: [ InMidstOfFileinNotification signal ifFalse: [ file flush ] ]]<br>
> > +         ifFalse:<br>
> > +             [self organization classComment: aString stamp: aStamp].<br>
> > +     <br>
> > +     SystemChangeNotifier uniqueInstance classCommented: self.!<br>
> > -     oldCommentRemoteStr := self organization commentRemoteStr.<br>
> > -     (aString size = 0) & (oldCommentRemoteStr == nil) ifTrue: [^ self organization classComment: nil].<br>
> > -         "never had a class comment, no need to write empty string out"<br>
> > - <br>
> > -     ptr := oldCommentRemoteStr ifNil: [0] ifNotNil: [oldCommentRemoteStr sourcePointer].<br>
> > -     SourceFiles ifNotNil: [(file := SourceFiles at: 2) ifNotNil:<br>
> > -         [file setToEnd; cr; nextPut: $!!.    "directly"<br>
> > -         "Should be saying (file command: 'H3') for HTML, but ignoring it here"<br>
> > -         header := String streamContents: [:strm | strm nextPutAll: self name;<br>
> > -             nextPutAll: ' commentStamp: '.<br>
> > -             aStamp storeOn: strm.<br>
> > -             strm nextPutAll: ' prior: '; nextPutAll: ptr printString].<br>
> > -         file nextChunkPut: header]].<br>
> > -     self organization classComment: (RemoteString newString: aString onFileNumber: 2) stamp: aStamp.<br>
> > -     file ifNotNil: [ InMidstOfFileinNotification signal ifFalse: [ file flush ] ].<br>
> > -     SystemChangeNotifier uniqueInstance classCommented: self.<br>
> > - !<br>
> > <br>
> > <br>
> > <br>
> <br>
> <br>
> tim<br>
> --<br>
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim<br>
> Oxymorons: Exact estimate<br>
> <br>