> On 3 May 2018, at 10:15, Marcus Denker <marcus.den...@inria.fr> wrote:
> 
> 
> 
>> On 2 May 2018, at 14:09, Marcus Denker <marcus.den...@inria.fr> wrote:
>> 
>> 
>> 
>>> On 26 Apr 2018, at 09:28, Guillermo Polito <guillermopol...@gmail.com> 
>>> wrote:
>>> 
>>> Hi,
>>> 
>>> It looks you got bit by this issue:
>>> 
>>> https://pharo.fogbugz.com/f/cases/21519/RemoveFromSystem-does-not-work-well-with-Undeclareds
>>> 
>>> It's not particular to Epicea. There should be a better management of 
>>> Undeclareds in general in all Pharo.
>>> 
>> 
>> It can be fixed by moving the binding to undeclared in #removeFromSystem: 
>> 
>> This is done by adding
>> 
>>  Undeclared declare: self name asSymbol from: Smalltalk globals.
>> 
>> before the "forgetClass: self logged:" line.
>> 
>> What we need to do in addition: Only do that when the class is referenced. 
>> #isUsedClass: does that, but it does integrate over all methods in the 
>> system.
>> 
> 
> I did a PR:
> 
>       https://github.com/pharo-project/pharo/pull/1281
> 
In the end I split the PR in two: #isReferenced first (already in) and now the 
one liner to put classes that are still referenced into Undeclared:

        https://github.com/pharo-project/pharo/pull/1374


This just adds 

self isReferenced ifTrue: [Undeclared declare: self name asSymbol from: 
Smalltalk globals].

And it seems to work… 

        Marcus

Reply via email to