<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Hi Chris,</p>
<p><br>
</p>
<p>(I could swear that I already replied your message, but I cannot find my answer.)</p>
<p><br>
</p>
<p>I was indeed talking about domain-specific unload actions. For example, delete a file cache or something similar ...</p>
<p>To me, the name "preamble of removal" indicates clearly that the script should be executed before removal. Does anyone see this differently?</p>
<p><br>
</p>
<p>And what do you mean with "removing previously-installed stuff"? I cannot see how this matches the current bug :)</p>
<p><br>
</p>
<p>Best,</p>
<p>Christoph</p>
<p><br>
</p>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Chris Muller <asqueaker@gmail.com><br>
<b>Gesendet:</b> Donnerstag, 19. Dezember 2019 00:10 Uhr<br>
<b>An:</b> The general-purpose Squeak developers list<br>
<b>Betreff:</b> Re: [squeak-dev] Monticello Bug? Preamble of removal is executed too late</font>
<div> </div>
</div>
<div>
<div dir="ltr">Hi Christoph,
<div class=" noBgColor"><br class=" noBgColor">
</div>
<div class=" noBgColor">#unload is the method responsible for handling domain-specific unload actions.</div>
<div class=" noBgColor"><br class=" noBgColor">
</div>
<div class=" noBgColor">I'm not sure what #preambleOfRemoval is for, unless it's for MC-specific cleanups related to a package..?</div>
<div class=" noBgColor"><br class=" noBgColor">
</div>
<div class=" noBgColor">More generally, focusing effort on automated building, configuration and deployment, up from base images, is going to pay a lot more future dividends than worrying about removing previously-installed stuff....    Uninstall + Install
 will never be better than only Install.<br class=" noBgColor">
</div>
<div class=" noBgColor"><br class=" noBgColor">
</div>
<div class=" noBgColor">Best,</div>
<div class=" noBgColor">  Chris</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Dec 18, 2019 at 4:00 AM Thiede, Christoph <<a href="mailto:Christoph.Thiede@student.hpi.uni-potsdam.de">Christoph.Thiede@student.hpi.uni-potsdam.de</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">
<div id="gmail-m_-2633667737501760812divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<p>Hi all, I found a possible bug in Monticello scripts. Let me try to describe the issue:</p>
<p><br>
</p>
<p><b>Steps to reproduce</b></p>
<p></p>
<ol style="margin-bottom:0px; margin-top:0px">
<li>In Monticello Browser, create a new package named #Foo</li><li>In the System Browser, create a new class named #FooClass in the system category #Foo</li><li>On its class side, add a method named #bar - just declare it.</li><li>In Monticello Browser, edit the preambleOfRemoval for our #Foo Package and set it to:<br>
FooClass bar</li><li>Save a version of our #Foo package</li><li>Still in Monticello Browser, unload the foo package via context menu.</li></ol>
<div><br>
</div>
<div><b>Expected behavior</b></div>
<div>The package is unloaded without any errors. If Foo class >> bar has a real implementation, it will have run when the package is removed.</div>
<div><br>
</div>
<div><b>Actual behavior</b></div>
<div>In MCRemovalPreambleDefinition >> #evaluate: UndefinedObject does not understand #bar.</div>
<div><br>
</div>
<div><b>Reason</b></div>
<div>In MCPackageLoader >> #analyze, the MCDependencySorter for removals does not return the removal preamble definition as the last item, but the class definition of FooClass. This happens somewhere in #addExternalProvisions:, because FooClass depends on Object
 and thus is moved to the end (?).</div>
<div><br>
</div>
<div><b>Questions</b></div>
<div>Am I right that this is a bug? I think we really want to execute the removal preamble *before* unloading any code definitions?</div>
<div>How could one solve this issue? Is it necessary to treat preambles/postambles separated so that they can't be messed up by dependencies? Or would know an easier way?</div>
<div>I'm not familiar at all with this domain, so if we want a fast solution, maybe someone others could have a look at it. Otherwise, I'd be happy to hear your opinions.</div>
<div><br>
</div>
<div>Best,</div>
<div>Christoph</div>
<p></p>
<div id="gmail-m_-2633667737501760812Signature">
<div id="gmail-m_-2633667737501760812divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<div name="divtagdefaultwrapper">
<div>
<div id="gmail-m_-2633667737501760812Item.MessagePartBody">
<div id="gmail-m_-2633667737501760812Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="gmail-m_-2633667737501760812divtagdefaultwrapper"><font face="Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="gmail-m_-2633667737501760812Signature">
<div style="margin:0px"><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,EmojiFont"></font></div>
</div>
</font></div>
</div>
</div>
</div>
</div>
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
</div>
<br>
</blockquote>
</div>
</div>
</div>
</body>
</html>