[BUG] Store sends #initialize to classes on package load

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[BUG] Store sends #initialize to classes on package load

Martin McClure
When a package is loaded the first time, all classes loaded are sent
#postLoad:. The default behavior of #postLoad: is to send the class
#initialize if it recognizes it, but this behavior can be overridden.

When one package version is already loaded, during the load of another
version of the package Store will send #initialize to any class for
which either:
* The class definition has changed, or
* The class-side #initialize method has changed



The initial load behavior is not consistent with the new version load
behavior. If #postLoad: has been overridden to not send #initialize on
initial load, #initialize should not be sent when a new version is loaded.

I'm thinking that PackageDifferences>>loadFromDBWithin: should not be
sending #initialize to these classes, but should instead be sending
#postLoad:.

That method should probably also be sending #postLoad: if the #postLoad:
method has been changed. I'm guessing that it's OK to continue to send
#postLoad: if the #initialize method changes.


-Martin