[squeak-dev] Moving methods

Bert Freudenberg bert at freudenbergs.de
Wed Apr 24 11:50:25 UTC 2013


On 2013-04-24, at 11:24, Frank Shearar <frank.shearar at gmail.com> wrote:

> On 23 April 2013 15:14, Bert Freudenberg <bert at freudenbergs.de> wrote:
>> Moving an active method from one package to another is fragile, as you discovered. The moved-to package must be loaded first, otherwise the method is deleted from the system.
>> 
>> The proper way to let MC handle this would be to load the two packages together, in which case the order would not matter. But this had worse consequences so we're using the update-map order instead.
> 
> Do you mean using slices?

No. Just adding all versions from a config to a single MCVersionLoader and then loading them in one go.

> If so, what are the worse problems?

I don't quite remember. Might have to do with initialization order. It's a lot less predictable, for sure.

>> A possible solution would be to go through the whole update map first and find the "bad" moves (those where a method or class would be deleted and later added again) and load only these. Since it only reclassifies, the actual system behavior would be unchanged. But the loading would succeed without introducing obsolete instances and missing methods.
> 
> That sounds like it could work. You have to get all those new updates
> anyway, so getting them up front and "merging" them wouldn't be (much
> of) a performance hit.


Well, it is going to be a a little more complicated if we want to avoid diffing twice (which is the major time consumer when loading an MC version). OTOH the critical cases might be easy to detect, and they should be few and far between ...

- Bert -




More information about the Squeak-dev mailing list