[Pharo-dev] How to delete an obsolete class ?

Olivier Auverlot olivier.auverlot at gmail.com
Tue Oct 15 01:43:07 EDT 2013


In my case, Smalltalk fixObsoleteReferences doesn't works. I was forced to rebuild a new image :-(

Best regards
Olivier 

Le 14 oct. 2013 à 08:50, roberto.minelli at usi.ch a écrit :

> Thank you Pavel,
> 
> Just run into the same situation and your 'Smalltalk fixObsoleteReferences' worked like a charm ;)
> 
> Cheers,
> Roberto
> 
> On Oct 10, 2013, at 11:11 AM, Pavel Krivanek <pavel.krivanek at gmail.com> wrote:
> 
>> Hi Olivier,
>> 
>> firstly try Smalltalk fixObsoleteReferences. Then try this:
>> 
>> Smalltalk tools pointerExplorer openOn: SystemNavigation default
>> obsoleteClasses first.
>> 
>> Look at every reference that is not related to the explorer itself and
>> try to find why it is not garbage-collected.
>> 
>> Cheers,
>> -- Pavel
>> 
>> 2013/10/10 Olivier Auverlot <olivier.auverlot at gmail.com>:
>>> Hi Pavel,
>>> 
>>> Thanks for your response.
>>> 
>>> I tryed this morning and in fact, the obsolete class has not instances.
>>> 
>>> SystemNavigation default obsoleteClasses {AnObsoletePVENodeStatus}
>>> 
>>> SystemNavigation default obsoleteClasses collect: #allSubInstances. an Array(an OrderedCollection())
>>> 
>>> have you an idea how to remove this class ?
>>> 
>>> Best regards
>>> Olivier ;-)
>>> 
>>> Le 9 oct. 2013 à 10:46, Pavel Krivanek a écrit :
>>> 
>>>> You need to check if it still does have some instances and kill them.
>>>> Then find and remove all references to the class.
>>>> 
>>>> SystemNavigation default obsoleteClasses.
>>>> 
>>>> SystemNavigation default obsoleteClasses collect: #allSubInstances.
>>>> 
>>>> SystemNavigation default obsoleteClasses first allSubInstances first pointersTo.
>>>> 
>>>> etc...
>>>> 
>>>> Good hunt
>>>> -- Pavel
>>>> 
>>>> 2013/10/9 Olivier Auverlot <olivier.auverlot at gmail.com>:
>>>>> Hi,
>>>>> 
>>>>> In my project, my code has a strange behavior when I'm reading all subclasses of an another class.
>>>>> 
>>>>> The following code must visit all the subclasses of PVEStatus but I get a bad result.
>>>>> 
>>>>>      PVEStatus allSubclasses
>>>>>              do: [ :statusDatatype |
>>>>>                      (aRawStatus at: 'type') = statusDatatype type
>>>>>                              ifTrue: [ ^ statusDatatype getStatus: aRawStatus callback: self ] ]
>>>>> 
>>>>> The answer contains #AnObsoletePVENodeStatus and this class doesn't exist. She doesn't appear in the class browser. I suppose that it's a rest of refactoring. How can I delete this obsolete class ?
>>>>> 
>>>>> Best regards
>>>>> Olivier ;-)
>>>>> 
>>>>> 
>>>>> 
>>>> 
>>> 
>>> 
>> 
> 
> 





More information about the Pharo-dev mailing list