[squeak-dev] The Inbox: System-fbs.523.mcz

Bert Freudenberg bert at freudenbergs.de
Sat Apr 13 19:08:11 UTC 2013


On 13.04.2013, at 11:46, Frank Shearar <frank.shearar at gmail.com> wrote:

> On 13 April 2013 19:27, Bert Freudenberg <bert at freudenbergs.de> wrote:
>> 
>> The regular Smalltalk cleanUp should be perfectly safe to call any time. So you would only need to implement the stuff specific to package unloading.
> 
> Oh, ok, so at the risk of being really slow, you're saying that this
> would be sufficient to (a) cleanly remove all trace of a package and
> (b) respect the rest of the image's current state:
> 
> unloadPackages: somePackageNames
>    "Remove the given packages from the system, including any
> registered applications, menu items, and the like."
>    somePackageNames do: [:pkgName|
>        (MCPackage named: pkgName) unload.
>        MCMcmUpdater disableUpdatesOfPackage: pkgName].
>    Smalltalk cleanUp


Not sure about (a) but (b) should be true (if not, it's a bug).

For (a), possibly MCPackage>>unload needs to do something extra, or your #unloadPackages: would need to do something extra per package. E.g. unloading a package should remove that package's categories, both for classes and extension methods. If it doesn't, that needs to be fixed.

- Bert -




More information about the Squeak-dev mailing list