[Q] Monticello versioning and subclassing

Colin Putney cputney at wiresong.ca
Thu Jun 15 14:06:21 UTC 2006


> 1.  Does Monticello offer some help with this situation?
> 2a.  Do I go ahead and just directly modify the existing class method
> to add my two lines and mark it as a Monticello class extension, or
> 2b.  Do I do the right thing and put in all the extra subclasses to
> properly overload the whole string of dependent class references?
> 3.  How do I deal with 2a when the owner of the existing class
> modifies that method some other way?

Hi David,

If the existing class is part of a Monticello package, the best way  
to deal with it is to just modify the method and save the package.  
You've effectively created your own branch of that package, and as  
new versions are released up stream, you just merge them into your  
branch.

Another option would be to override the existing method. Modify it  
and move it into a category called *mypackage-overrides. This will  
let Monticello know that your package overrides the existing method,  
without "stealing" it from the other package. This mostly works, but  
you can run into problems with overrides because PackageInfo is not a  
real packaging system, and there are corner cases that can cause  
methods to be lost.

Does this help?

Colin



More information about the Squeak-dev mailing list