<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr"><br></div><div dir="ltr"><blockquote type="cite">On Apr 5, 2022, at 4:48 AM, Thiede, Christoph <Christoph.Thiede@student.hpi.uni-potsdam.de> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr">

<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">



<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Hi Marcel,</p>
<p><br>
</p>
<p>thanks for the feedback.</p>
<p><br>
</p>
<p>> <span>I mean, we don't store sources in a method trailer but don't log them at all if that preference is enabled.</span></p>
<p><span><br>
</span></p>
<p><span>I wish we did. It should be pretty easy, see <span>CompiledMethod>>#getSourceFor:in:</span>:</span></p>
<p><span><br>
</span></p>
<p><span>aCompiledMethod properties at: #source put: aStringOrText.</span></p>
<p><span><br>
</span></p>
<p>What do you think? :-)</p></div></div></blockquote><div><br></div>+1<br><blockquote type="cite"><div dir="ltr"><div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p><br>
</p>
<p><span style="font-size: 12pt;">> </span><span style="font-size: 12pt;">I think there should be a very prominent indication in the Morphic world whenever the image is configured to not log changes.</span></p>
<p><span><br>
</span></p>
<p><span>As this is an optional preference, I'm not sure whether we need that indication. But one option could be appending a text like ' (no changes)' to the changes menu item in the docking bar.</span></p></div></div></blockquote>+1.  I would display the name of the changes file when there is one, and “(no changes)” when there isn’t.<br><blockquote type="cite"><div dir="ltr"><div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p><span><br>
</span></p>
<p><span>Best,</span></p>
<p><span>Christoph</span></p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel<br>
<b>Gesendet:</b> Dienstag, 5. April 2022 11:34:16<br>
<b>An:</b> squeak-dev<br>
<b>Betreff:</b> Re: [squeak-dev] The Inbox: Kernel-ct.1455.mcz</font>
<div> </div>
</div>
<div>
<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
At this level, RemoteString, String, and Text should be interchangeable. At least to the tools that query that information. I wouldn't worry. Looks good.
<div><br>
</div>
<div>Well, it's still kind of different from the Decompiler approach, right? I mean, we don't store sources in a method trailer but don't log them at all if that preference is enabled. Then again, string literals in methods are literals and live in the image
 anyway. So... :-)<br>
<div><br>
</div>
<div>Hmm... I think there should be a very prominent indication in the Morphic world whenever the image is configured to not log changes. Any ideas?</div>
<div><br>
</div>
<div>Best,</div>
<div>Marcel</div>
<div class="mb_sig"></div>
</div>
<blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
<p style="color: #AAAAAA; margin-top: 10px;">Am 04.04.2022 13:45:36 schrieb christoph.thiede@student.hpi.uni-potsdam.de <christoph.thiede@student.hpi.uni-potsdam.de>:</p>
<div style="font-family:Arial,Helvetica,sans-serif">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>
<span style="color: #808080">---<br>
</span><span style="color: #808080"><i>Sent from </i></span><span style="color: #808080"><i><a href="https://github.com/hpi-swa-lab/squeak-inbox-talk"><u><span style="color: #808080">Squeak Inbox Talk</span></u></a></i></span><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>
> </div>
</blockquote>
</div>
</div>


<span></span><br></div></blockquote></body></html>