<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 9, 2014 at 12:36 PM, Chris Muller <span dir="ltr">&lt;<a href="mailto:asqueaker@gmail.com" target="_blank">asqueaker@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">On Tue, Dec 9, 2014 at 8:02 AM, Craig Latta &lt;<a href="mailto:craig@netjam.org">craig@netjam.org</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; Do your pool references end up being valid?<br>
&gt;<br>
&gt;      Aha, the answer is no. So, I had to put some things in a separate<br>
&gt; package which must be loaded first. Among those things is a change<br>
&gt; required by a remote-object-aware version of<br>
&gt; IdentityDictionary&gt;&gt;scanFor:; the system was crashing when they were<br>
&gt; loaded in the wrong order.<br>
<br>
</span>Interesting.  What did you have to do to #scanFor:, some kind of proxy<br>
detection or something?<br>
<br>
PS -- I agree with Eliot that MC _should_ handle compiling subclasses<br>
of SharedPool first.  I thought it did..<br></blockquote><div><br></div><div>No, right now only methodAdditions are handled first.  Look at MCPackageLoader&gt;&gt;basicLoad which is aching to be refactored to pull the exception handlers out.  It should look like</div><div><br></div><div><div>basicLoad</div><div><span class="" style="white-space:pre">        </span>&quot;Load the contents of some package. This is the core loading method</div><div><span class="" style="white-space:pre">        </span>in Monticello. Be wary about modifying it unless you understand the details</div><div><span class="" style="white-space:pre">        </span>and dependencies of the various entities being modified.&quot;</div><div><span class="" style="white-space:pre">        </span>RecentMessages default suspendWhile:</div><div><span class="" style="white-space:pre">                </span>[[CurrentReadOnlySourceFiles cacheDuring:</div><div><span class="" style="white-space:pre">                        </span>[[self innerBasicLoad]</div><div><span class="" style="white-space:pre">                                </span>on: InMidstOfFileinNotification</div><div><span class="" style="white-space:pre">                                </span>do: [:n | n resume: true]]]</div><div><span class="" style="white-space:pre">                        </span>ensure: [self flushChangesFile]]</div></div></div><br clear="all"><div><div>innerBasicLoad</div><div><span class="" style="white-space:pre">        </span>&quot;Load the contents of some package. This is the core loading method</div><div><span class="" style="white-space:pre">        </span>in Monticello. Be wary about modifying it unless you understand the details</div><div><span class="" style="white-space:pre">        </span>and dependencies of the various entities being modified.&quot;</div><div><span class="" style="white-space:pre">        </span>| pkgName |</div><div><span class="" style="white-space:pre">        </span>errorDefinitions := OrderedCollection new.</div><div><span class="" style="white-space:pre">        </span>&quot;Obviously this isn&#39;t the package name but we don&#39;t have anything else</div><div><span class="" style="white-space:pre">        </span>to use here. ChangeSet current name will generally work since a CS is </div><div><span class="" style="white-space:pre">        </span>usually installed prior to installation.&quot;</div><div><span class="" style="white-space:pre">        </span>pkgName := ChangeSet current name.</div><div><span class="" style="white-space:pre">        </span>preamble ifNotNil:</div><div><span class="" style="white-space:pre">                </span>[ChangeSet current preambleString: (self preambleAsCommentNamed: pkgName)].</div><div><br></div><div><span class="" style="white-space:pre">        </span>&quot;Pass 1: Load everything but the methods,  which are collected in methodAdditions.&quot;</div><div><span class="" style="white-space:pre">        </span>additions</div><div><span class="" style="white-space:pre">                </span>do: [:ea | </div><div><span class="" style="white-space:pre">                        </span>ea isMethodDefinition </div><div><span class="" style="white-space:pre">                                </span>ifTrue: [methodAdditions add: ea asMethodAddition]</div><div><span class="" style="white-space:pre">                                </span>ifFalse:</div><div><span class="" style="white-space:pre">                                        </span>[[ea load]</div><div><span class="" style="white-space:pre">                                                </span>on: Error</div><div><span class="" style="white-space:pre">                                                </span>do: [errorDefinitions add: ea]]]</div><div><span class="" style="white-space:pre">                </span>displayingProgress: &#39;Reshaping &#39;, pkgName.</div><div><br></div><div><span class="" style="white-space:pre">        </span>&quot;Try again any delayed definitions&quot;</div><div><span class="" style="white-space:pre">        </span>self shouldWarnAboutErrors ifTrue:</div><div><span class="" style="white-space:pre">                </span>[self warnAboutErrors].</div><div><span class="" style="white-space:pre">        </span>errorDefinitions do: [:ea | ea load] </div><div><span class="" style="white-space:pre">                </span>displayingProgress: &#39;Reloading &#39;, pkgName.</div><div><br></div><div><span class="" style="white-space:pre">        </span>&quot;Pass 2: We compile new / changed methods&quot;</div><div><span class="" style="white-space:pre">        </span>methodAdditions</div><div><span class="" style="white-space:pre">                </span>do: [:ea| ea createCompiledMethod] </div><div><span class="" style="white-space:pre">                </span>displayingProgress: &#39;Compiling &#39;, pkgName.</div><div><br></div><div><span class="" style="white-space:pre">        </span>&#39;Installing &#39;, pkgName</div><div><span class="" style="white-space:pre">                </span>displayProgressFrom: 0</div><div><span class="" style="white-space:pre">                </span>to: 2</div><div><span class="" style="white-space:pre">                </span>during:</div><div><span class="" style="white-space:pre">                        </span>[:bar|</div><div><span class="" style="white-space:pre">                        </span>&quot;There is no progress *during* installation since a progress bar update</div><div><span class="" style="white-space:pre">                        </span>will redraw the world and potentially call methods that we&#39;re just trying to install.&quot;</div><div><span class="" style="white-space:pre">                        </span>bar value: 1.</div><div><br></div><div><span class="" style="white-space:pre">                        </span>&quot;Pass 3: Install the new / changed methods</div><div><span class="" style="white-space:pre">                        </span>(this is a separate pass to allow compiler changes to be loaded)&quot;</div><div><span class="" style="white-space:pre">                        </span>methodAdditions do:</div><div><span class="" style="white-space:pre">                                </span>[:ea| ea installMethod].</div><div><br></div><div><span class="" style="white-space:pre">                        </span>&quot;Pass 4: Remove the obsolete methods&quot;</div><div><span class="" style="white-space:pre">                        </span>removals do:</div><div><span class="" style="white-space:pre">                                </span>[:ea| ea unload]].</div><div><br></div><div><span class="" style="white-space:pre">        </span>&quot;Finally, notify observers for the method additions&quot;</div><div><span class="" style="white-space:pre">        </span>methodAdditions</div><div><span class="" style="white-space:pre">                </span>do: [:each | each notifyObservers] </div><div><span class="" style="white-space:pre">                        </span>&quot;the message is fake but actually telling people how much time we spend</div><div><span class="" style="white-space:pre">                        </span>in the notifications is embarrassing so lie instead&quot;</div><div><span class="" style="white-space:pre">                </span>displayingProgress: &#39;Installing &#39;, pkgName.</div><div><br></div><div><span class="" style="white-space:pre">        </span>additions</div><div><span class="" style="white-space:pre">                </span>do: [:ea | ea postloadOver: (self obsoletionFor: ea)] </div><div><span class="" style="white-space:pre">                </span>displayingProgress: &#39;Initializing &#39;, pkgName</div></div><div><br></div><div>But I have to say that I don&#39;t understand how basicLoad/innerBasicLoad sorts things.  Confusing.  Anyway, looks like the &quot;Pass 1: Load everything but the methods,  which are collected in methodAdditions.&quot; pass needs to be split into something that loads things that inherit from SharedPool first.</div><div><br></div>-- <br><div class="gmail_signature">best,<div>Eliot</div></div>
</div></div>