<div dir="ltr">Johan,<div><br></div><div>GsPackagePolicy changed shape somewhere along the line (pre 3.3 perhaps?) so it's something that may only need to be done when upgrading across that boundary ... </div><div><br></div><div>Dale</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 5, 2022 at 6:03 AM Johan Brichau <<a href="mailto:johan@yesplan.be">johan@yesplan.be</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 style="overflow-wrap: break-word;">Hi Dale,<div><br></div><div>Reviving this thread since there still are some references to old compiled blocks left in the upgraded repository which I missed earlier on.<br><div>Although most were removed after executing the script to clean the session methods structure, I was still left with the list below.</div><div><br></div><div>Since these were referenced from an old class version of GsPackagePolicy, I ran the following as SystemUser:</div><div><br></div><div><span style="white-space:pre-wrap"> </span>GsPackagePolicy classHistory removeVersion: GsPackagePolicy classHistory first</div><div><br></div><div>Which cleared the list.</div><div>Does this look like an expected/normal step I can/need to do?</div><div><br></div><div>Cheers,</div><div>Johan</div><div><br><div>------</div><div> doit<br> | obsoleteBlockClasses blockArrays |<br> obsoleteBlockClasses := Array withAll: (ObsoleteClasses select: [ :object | object isClass and: [ object inheritsFrom: BlockClosure ] ]).<br> blockArrays := SystemRepository listInstances: obsoleteBlockClasses.<br> blockArrays do: [ :blockArray |<br> blockArray do: [ :block |<br> Transcript show: ('Instance {1} of {2} was defined in: {3}>>#{4}' format: { block asOop. block class name. block method inClass name. block method selector }) ] ].<br> nil<br><div><br></div><div><div><div>--transcript--'Instance 8573185 of SimpleBlock was defined in: GsPackagePolicy class>>#initialize'</div><div>--transcript--'Instance 8600577 of ComplexVCBlock was defined in: GsPackagePolicy>>#buildSessionMethodDictionary'</div><div>--transcript--'Instance 8600833 of ComplexVCBlock was defined in: GsPackagePolicy>>#buildSessionMethodDictionary'</div><div>--transcript--'Instance 8582913 of ComplexBlock was defined in: GsPackagePolicy>>#removeSelector:fromCategoriesFor:'</div><div>--transcript--'Instance 8584193 of ComplexBlock was defined in: GsPackagePolicy>>#sessionMethodRemoveAllMethodsFor:'</div><div>--transcript--'Instance 8585473 of ComplexBlock was defined in: GsPackagePolicy>>#removeAllSubclassCodeFor:'</div><div>--transcript--'Instance 8587777 of ComplexBlock was defined in: GsPackagePolicy>>#setStamp:forBehavior:forMethod:'</div><div>--transcript--'Instance 8589057 of ComplexBlock was defined in: GsPackagePolicy>>#packagesDo:'</div><div>--transcript--'Instance 8591361 of ComplexBlock was defined in: GsPackagePolicy>>#copyCategoryDictFor:into:'</div><div>--transcript--'Instance 8592129 of ComplexBlock was defined in: GsPackagePolicy>>#selectorsFor:into:'</div><div>--transcript--'Instance 8592897 of ComplexBlock was defined in: GsPackagePolicy>>#categoryOfSelector:for:'</div><div>--transcript--'Instance 8593665 of ComplexBlock was defined in: GsPackagePolicy>>#compiledMethodAt:for:'</div><div>--transcript--'Instance 8594433 of ComplexBlock was defined in: GsPackagePolicy>>#includesSelector:for:'</div><div>--transcript--'Instance 8595201 of ComplexBlock was defined in: GsPackagePolicy>>#copyMethodDictFor:into:'</div><div>--transcript--'Instance 8596481 of ComplexBlock was defined in: GsPackagePolicy>>#removeAllMethodsFor:'</div><div>--transcript--'Instance 8597249 of ComplexBlock was defined in: GsPackagePolicy>>#removeMethodAt:for:'</div><div>--transcript--'Instance 8598529 of ComplexBlock was defined in: GsPackagePolicy>>#packageReverseDo:'</div><div>--transcript--'Instance 8600321 of ComplexBlock was defined in: GsPackagePolicy>>#buildSessionMethodDictionary'</div><div>--transcript--'Instance 8605185 of ComplexBlock was defined in: GsPackagePolicy>>#permitSessionMethodFor:selector:'</div><div>--transcript--'Instance 8605953 of ComplexBlock was defined in: GsPackagePolicy>>#pragmasForMethod:in:'</div><div>--transcript--'Instance 8606721 of ComplexBlock was defined in: GsPackagePolicy>>#stampForMethod:in:'</div><div>--transcript--'Instance 8607489 of ComplexBlock was defined in: GsPackagePolicy>>#setPragmas:forBehavior:forMethod:'</div><div>--transcript--'Instance 8610305 of ComplexBlock was defined in: GsPackagePolicy>>#sessionMethodRemoveMethodAt:for:'</div><div>--transcript--'Instance 8611073 of ComplexBlock was defined in: GsPackagePolicy>>#sessionMethodRemoveAllSubclassCodeFor:'</div><div>--transcript--'Instance 8611841 of ComplexBlock was defined in: GsPackagePolicy>>#removeCategory:for:'</div><div>--transcript--'Instance 8612609 of ComplexBlock was defined in: GsPackagePolicy>>#categoryNamesFor:into:'</div><div>--transcript--'Instance 8613377 of ComplexBlock was defined in: GsPackagePolicy>>#selectorsIn:for:into:'</div></div><div><br><div><br><blockquote type="cite"><div>On 19 Nov 2021, at 23:39, Dale Henrichs <<a href="mailto:dale.henrichs@gemtalksystems.com" target="_blank">dale.henrichs@gemtalksystems.com</a>> wrote:</div><br><div><div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Check.<br>To be clear: it’s not in the post upgrade step of the GsDevKit code?<br>It’s not that I missed it when copying them to our scripts…?<br></blockquote><div>The session method cleanup script I sent is NOT part of postUpgrade processing ... I didn't think that the session methods structure could be a culprit for holding onto old GsMethod instances until you noticed the problem, so I've submitted an issue against GsDevKit_upgrade[1] which is used to drive the seasideImage upgrade process for 3.5.x and beyond ...</div><div><br></div><div>Dale</div><div><br></div><div>[1] <a href="https://github.com/GsDevKit/GsDevKit_upgrade/issues/21" target="_blank">https://github.com/GsDevKit/GsDevKit_upgrade/issues/21</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Nov 19, 2021 at 12:40 PM Johan Brichau <<a href="mailto:johan@yesplan.be" target="_blank">johan@yesplan.be</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"><br>
<br>
> On 19 Nov 2021, at 21:07, Dale Henrichs <<a href="mailto:dale.henrichs@gemtalksystems.com" target="_blank">dale.henrichs@gemtalksystems.com</a>> wrote:<br>
> <br>
> With regards to dealing with block instances, I believe there should be a section in the release notes that provides scripts for finding a replacing obsolete block instances for use cases like SortedCollection, where the potentially obsolete block instance is stored in an instance variable ...<br>
<br>
Yes, we apply the postconv script as mentioned in the upgrade instructions.<br>
We have some blocks left in our application code that require manual intervention and that’s why we also noticed the ones referenced by the GsMethod instances.<br>
<br>
> And yes, the session method cleanup code should be included in your post upgradeSeasideImage processing along with "sort block" cleanup code ...<br>
<br>
Check.<br>
To be clear: it’s not in the post upgrade step of the GsDevKit code?<br>
It’s not that I missed it when copying them to our scripts…?</blockquote></div>
</div></blockquote></div><br></div></div></div></div></div></div></blockquote></div>