<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 all,</p>
<p><br>
</p>
<p>as you might have noticed, I spent some time on decorating various methods <span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">
with #deprecated </span>that are in deprecation packages.</p>
<p><br>
</p>
<p>I am wondering what the general "rule" or at least desire about deprecated methods is. Would you agree the following guideline?</p>
<p>"A method should be in a *Deprecated* method category if and only if it calls #deprecated or any overload of that."</p>
<p><br>
</p>
<p>If this is correct, I wrote two tests to check both directions of this rule. I would propose to put them into ReleaseTest:</p>
<p><br>
</p>
<p></p>
<div>testDeprecatedMethodsAreInDeprecatedPackages</div>
<div><br>
</div>
<div><span style="white-space:pre"></span>CompiledMethod allInstances</div>
<div><span style="white-space:pre"></span>select: [:method | method isInstalled]</div>
<div><span style="white-space:pre"></span>thenDo: [:method |</div>
<div><span style="white-space:pre"></span>| category |</div>
<div><span style="white-space:pre"></span>category := method methodClass whichCategoryIncludesSelector: method selector.</div>
<div><span style="white-space:pre"></span>(method isDeprecated and: [category notNil]) ifTrue: [</div>
<div><span style="white-space:pre"></span>self assert: [category name includesSubstring: 'Deprecated']]].</div>
<br>
<p></p>
<p></p>
<div>testMethodsInDeprecatedPackagesAreDeprecated</div>
<div><br>
</div>
<div><span style="white-space:pre"></span>CompiledMethod allInstances</div>
<div><span style="white-space:pre"></span>select: [:method | method isInstalled]</div>
<div><span style="white-space:pre"></span>thenDo: [:method |</div>
<div><span style="white-space:pre"></span>| category |</div>
<div><span style="white-space:pre"></span>category := method methodClass whichCategoryIncludesSelector: method selector.</div>
<div><span style="white-space:pre"></span>category name ifNotNil: [:name |</div>
<div><span style="white-space:pre"></span>(name includesSubstring: 'Deprecated') ifTrue: [</div>
<div><span style="white-space:pre"></span>self assert: [method isDeprecated]]]].</div>
<div><br>
</div>
<div>Or are there any special cases where we would like to preserve a different deprecation state between category and literal indication?</div>
<div>For example, SequenceableCollection>>#upTo: breaks the first test. Does this method belong into *60Deprecated?</div>
<div><br>
</div>
<div>For the other test, respecting the latest inbox commits there is only one violation (<span>FancyMailComposition>>#mvcOpen).</span></div>
<div><span>(How) should we solve that? With Project>>#tellAFriend:, this method actually has a non-deprecated sender.</span></div>
<div><span><span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">Is #tellAFriend: still relevant? Maybe we could restrict
 FancyMailComposition to Morphic, according to its package name.</span><br>
</span></div>
<div><span>In general, I find its placement quite confusing: The class category name consists of both 'MorphicExtras' & 'Etoys', which usually seem to be separated (or, respecting Squeakland, at least combined the other way round). There are two different UI
 methods (#morphicOpen and #openInMorphic) without any clear distinction. Despite of the name 'morphic', the MVCUIManager depends on this class (and #mvcOpen depends on MVC, vice versa).</span></div>
<div><span><br>
</span></div>
<div><span>Looking forward to your answers :)</span></div>
<div>Christoph</div>
<div id="Signature">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</body>
</html>