<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>