[Glass] Finding instances of old (removed) classes

Dale Henrichs via Glass glass at lists.gemtalksystems.com
Fri Oct 9 15:58:50 PDT 2015


Paul,

I'd like to know a little bit more about what you are trying to 
accomplish ...

If I assume that the references to the orphaned classes are instances of 
the orphaned class  then you will want to migrate those instances to the 
new version of the class.

If those references are not from instances of the orphaned class - a 
direct reference to the orphaned class (as a key in a dictionary or 
something similar) then migration will not solve your problem ... you 
will have to do a findAllReferencePathsToObject .... and find clean up 
the references.

For instance migration you should do some similar to 
GsDeployer>>doBulkMigrate: where the `classList` is your list of 
orphaned classes ..

Dale


On 10/09/2015 02:54 PM, Paul DeBruicker via Glass wrote:
> Thanks Dale.
>
> I've now got the list of orphaned classes and  list of references to each of
> the orphan classes.
>
> How do I migrate them to the newer/current versions of the classes?
>
> Is it just
>
> System abort.
> orphanedClasses do:[:orphanClass | orphanClass migrateTo: (Smalltalk at:
> orphanClass name)]
> System commit.
>
> or something more?
>
>
> Paul
>
>
> GLASS mailing list wrote
>> I think the actual script was in this message[1].
>>
>> Dale
>>
>> [1]
>> http://forum.world.st/instances-of-old-class-versions-tp4100977p4102175.html
>>
>> On 10/09/2015 10:29 AM, Paul DeBruicker via Glass wrote:
>>> I may be running into this too.
>>>
>>> Is this the old script you had in mind:
>>>
>>> http://forum.world.st/instances-of-old-class-versions-td4100977.html
>>>
>>> ?
>>>
>>>
>>>
>>>
>>>
>>> GLASS mailing list wrote
>>>> I remember I once saw a script to find all instances whose class is an
>>>> old
>>>> class version.
>>>>
>>>> I cannot iterate over the class history because the old classes are no
>>>> longer in there. But I do encounter some instances of those old classes
>>>> and I want to sweep the repository to detect all such instances.
>>>>
>>>> Does anyone still have that script?
>>>>
>>>> thanks!
>>>> Johan
>>>> _______________________________________________
>>>> Glass mailing list
>>>> Glass at .gemtalksystems
>>>> http://lists.gemtalksystems.com/mailman/listinfo/glass
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://forum.world.st/Finding-instances-of-old-removed-classes-tp4844829p4854802.html
>>> Sent from the GLASS mailing list archive at Nabble.com.
>>> _______________________________________________
>>> Glass mailing list
>>>
>> Glass at .gemtalksystems
>>> http://lists.gemtalksystems.com/mailman/listinfo/glass
>> _______________________________________________
>> Glass mailing list
>> Glass at .gemtalksystems
>> http://lists.gemtalksystems.com/mailman/listinfo/glass
>
>
>
>
> --
> View this message in context: http://forum.world.st/Finding-instances-of-old-removed-classes-tp4844829p4854833.html
> Sent from the GLASS mailing list archive at Nabble.com.
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass



More information about the Glass mailing list