<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">2013/12/18 Chris Muller <span dir="ltr">&lt;<a href="mailto:asqueaker@gmail.com" target="_blank">asqueaker@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This was the change I made to &quot;suspend&quot; RecentMessages when loading<br>
packages but, at the time, it created a VM crash during trunk update<br>
due to class shape-change while on the stack.<br>
<br>
So, we rolled back the #suspendWhile: [...] in this method, but we<br>
still have the new isSuspended instVar which is now unused.<br>
<br>
But I just noticed we never put the suspendWhile: back, and yet,<br>
somehow, SystemChangeNotifier is no  longer notifying RecentMessages<br>
of loaded methods.<br>
<br>
It&#39;s not immediately obvious to me why.  Is this related to your<br>
logging API work Nicolas?<br></blockquote><div><br></div><div>No, I just changed the implementation, not the behavior.<br></div><div>It will be easier to move logging support out of Compiler when we want to, but it&#39;s not yet done.<br>
 <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
On Thu, Oct 3, 2013 at 4:40 PM,  &lt;<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>&gt; wrote:<br>
&gt; Chris Muller uploaded a new version of Monticello to project The Trunk:<br>
&gt; <a href="http://source.squeak.org/trunk/Monticello-cmm.573.mcz" target="_blank">http://source.squeak.org/trunk/Monticello-cmm.573.mcz</a><br>
&gt;<br>
&gt; ==================== Summary ====================<br>
&gt;<br>
&gt; Name: Monticello-cmm.573<br>
&gt; Author: cmm<br>
&gt; Time: 3 October 2013, 4:39:53.815 pm<br>
&gt; UUID: c3383883-707a-4bc1-b3ea-3b2ca97053d7<br>
&gt; Ancestors: Monticello-fbs.572<br>
&gt;<br>
&gt; - Factor out cacheAllFilenames and flushAllFilenames to support special-case caching.<br>
&gt; - Stop obliterating Recent Messages when loading MC packages.<br>
&gt;<br>
&gt; =============== Diff against Monticello-fbs.572 ===============<br>
&gt;<br>
&gt; Item was changed:<br>
&gt;   ----- Method: MCFileBasedRepository&gt;&gt;cacheAllFileNamesDuring: (in category &#39;private&#39;) -----<br>
&gt; + cacheAllFileNamesDuring: aBlock<br>
&gt; - cacheAllFileNamesDuring: aBlock<br>
&gt;         &quot;Cache the result of #allFileNames and #allVersionNames during aBlock&quot;<br>
&gt; +       allFileNamesCache ifNotNil: [ ^ aBlock value ].<br>
&gt; +       self cacheAllFilenames.<br>
&gt; +       ^ aBlock ensure: [ self flushAllFilenames ]!<br>
&gt; -<br>
&gt; -       allFileNamesCache ifNotNil: [ ^aBlock value ].<br>
&gt; -       allFileNamesCache := self allFileNames.<br>
&gt; -       allVersionNamesCache := self allVersionNames.<br>
&gt; -       ^aBlock ensure: [ allFileNamesCache := allVersionNamesCache := nil ]!<br>
&gt;<br>
&gt; Item was added:<br>
&gt; + ----- Method: MCFileBasedRepository&gt;&gt;cacheAllFilenames (in category &#39;private&#39;) -----<br>
&gt; + cacheAllFilenames<br>
&gt; +       allFileNamesCache ifNil:<br>
&gt; +               [ allFileNamesCache := self allFileNames.<br>
&gt; +               allVersionNamesCache := self allVersionNames ]!<br>
&gt;<br>
&gt; Item was added:<br>
&gt; + ----- Method: MCFileBasedRepository&gt;&gt;flushAllFilenames (in category &#39;private&#39;) -----<br>
&gt; + flushAllFilenames<br>
&gt; +       allFileNamesCache := allVersionNamesCache := nil!<br>
&gt;<br>
&gt; Item was changed:<br>
&gt;   ----- Method: MCFileBasedRepository&gt;&gt;flushCache (in category &#39;private&#39;) -----<br>
&gt;   flushCache<br>
&gt; +       self flushAllFilenames.<br>
&gt; +       cache := nil!<br>
&gt; -<br>
&gt; -       cache := allFileNamesCache := allVersionNamesCache := nil!<br>
&gt;<br>
&gt; Item was changed:<br>
&gt;   ----- Method: MCPackageLoader&gt;&gt;basicLoad (in category &#39;private&#39;) -----<br>
&gt;   basicLoad<br>
&gt;         &quot;Load the contents of some package. This is the core loading method<br>
&gt;         in Monticello. Be wary about modifying it unless you understand the details<br>
&gt;         and dependencies of the various entities being modified.&quot;<br>
&gt;         | pkgName |<br>
&gt;         errorDefinitions := OrderedCollection new.<br>
&gt;         &quot;Obviously this isn&#39;t the package name but we don&#39;t have anything else<br>
&gt;         to use here. ChangeSet current name will generally work since a CS is<br>
&gt;         usually installed prior to installation.&quot;<br>
&gt;         pkgName := ChangeSet current name.<br>
&gt;         preamble ifNotNil: [ChangeSet current preambleString: (self preambleAsCommentNamed: pkgName)].<br>
&gt;<br>
&gt; + RecentMessages default suspendWhile: [<br>
&gt;         [CurrentReadOnlySourceFiles cacheDuring: [[<br>
&gt;         &quot;Pass 1: Load everything but the methods,  which are collected in methodAdditions.&quot;<br>
&gt;         additions do: [:ea |<br>
&gt;                 ea isMethodDefinition<br>
&gt;                         ifTrue:[methodAdditions add: ea asMethodAddition]<br>
&gt;                         ifFalse:[[ea load]on: Error do: [errorDefinitions add: ea]].<br>
&gt;         ] displayingProgress: &#39;Reshaping &#39;, pkgName.<br>
&gt;<br>
&gt;         &quot;Try again any delayed definitions&quot;<br>
&gt;         self shouldWarnAboutErrors ifTrue: [self warnAboutErrors].<br>
&gt;         errorDefinitions do: [:ea | ea load]<br>
&gt;                 displayingProgress: &#39;Reloading &#39;, pkgName.<br>
&gt;<br>
&gt;         &quot;Pass 2: We compile new / changed methods&quot;<br>
&gt;         methodAdditions do:[:ea| ea createCompiledMethod]<br>
&gt;                 displayingProgress: &#39;Compiling &#39;, pkgName.<br>
&gt;<br>
&gt;         &#39;Installing &#39;, pkgName displayProgressFrom: 0 to: 2 during:[:bar|<br>
&gt;                 &quot;There is no progress *during* installation since a progress bar update<br>
&gt;                 will redraw the world and potentially call methods that we&#39;re just trying to install.&quot;<br>
&gt;                 bar value: 1.<br>
&gt;<br>
&gt;                 &quot;Pass 3: Install the new / changed methods<br>
&gt;                 (this is a separate pass to allow compiler changes to be loaded)&quot;<br>
&gt;                 methodAdditions do:[:ea| ea installMethod].<br>
&gt;<br>
&gt;                 &quot;Pass 4: Remove the obsolete methods&quot;<br>
&gt;                 removals do:[:ea| ea unload].<br>
&gt;         ].<br>
&gt;<br>
&gt;         &quot;Finally, notify observers for the method additions&quot;<br>
&gt;         methodAdditions do: [:each | each notifyObservers]<br>
&gt;                 &quot;the message is fake but actually telling people how much time we spend<br>
&gt;                 in the notifications is embarrassing so lie instead&quot;<br>
&gt;                 displayingProgress: &#39;Installing &#39;, pkgName.<br>
&gt;<br>
&gt;         additions do: [:ea | ea postloadOver: (self obsoletionFor: ea)]<br>
&gt;                 displayingProgress: &#39;Initializing &#39;, pkgName.<br>
&gt;<br>
&gt;         ] on: InMidstOfFileinNotification do: [:n | n resume: true]<br>
&gt; +       ]] ensure: [self flushChangesFile]<br>
&gt; + ]!<br>
&gt; -       ]] ensure: [self flushChangesFile]!<br>
&gt;<br>
&gt; Item was added:<br>
&gt; + ----- Method: MCRepository&gt;&gt;cacheAllFilenames (in category &#39;private&#39;) -----<br>
&gt; + cacheAllFilenames<br>
&gt; +       &quot;No-op by default.  Subclasses override for performance.&quot;!<br>
&gt;<br>
&gt; Item was added:<br>
&gt; + ----- Method: MCRepository&gt;&gt;flushAllFilenames (in category &#39;private&#39;) -----<br>
&gt; + flushAllFilenames<br>
&gt; +       &quot;No-op.  Subclasses override if necessary.&quot;!<br>
&gt;<br>
&gt;<br>
<br>
</blockquote></div><br></div></div>