<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" 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="Signature">
<div id="divtagdefaultwrapper" 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" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div>
<div class="_rp_T4" id="Item.MessagePartBody">
<div class="_rp_U4 ms-font-weight-regular ms-font-color-neutralDark rpHighlightAllClass rpHighlightBodyClass" id="Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="divtagdefaultwrapper"><font face="Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="Signature">
<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>
</body>
</html>