[squeak-dev] Smalltalk fixObsoleteReferences

Frank Shearar frank.shearar at gmail.com
Wed Sep 11 10:43:13 UTC 2013

On 11 September 2013 11:21, Edgar J. De Cleene <edgardec2005 at gmail.com> wrote:
> El 9/10/13 10:18 PM, "Chris Muller" <asqueaker at gmail.com> escribió:
>>I want to experiment with Smalltalk #shrink but the stock
>>Squeak4.5-12641.image has AnObsoleteBindingTest and... one other
>>ObsoleteClass stuck in the image.  Not even Smalltalk
>>fixObsoleteReferences can get rid of it.
>>The reference is buried in Environment's 'exports' Dictionary.  I can
>>certainly remove it manually but how should we fix it in published
> Yesterday I made the monthly update following trunk of my SqueakRosCore
> and notice we don't have Smalltalk unloadAllKnownPackages now
> My idea is
> unloadReloadablePackages
>  "Unload packages which can be reloaded."
>   #( 'ReleaseBuilder' 'ScriptLoader'
>   '311Deprecated' '39Deprecated'
>   'Universes' 'SMLoader' 'SMBase' 'Installer-Core'
>   'VersionNumberTests' 'VersionNumber'
>   'Services-Base' 'PreferenceBrowser' 'Nebraska'
>   'ToolBuilder-MVC' 'ST80'
>   'CollectionsTests' 'GraphicsTests' 'KernelTests'  'MorphicTests'
>   'MultilingualTests' 'NetworkTests' 'ToolsTests' 'TraitsTests'
>   'SystemChangeNotification-Tests' 'FlexibleVocabularies'
>   'EToys' 'Protocols' 'XML-Parser' 'Tests' 'SUnitGUI'
>   'Help-Squeak' 'HelpSystem' 'SystemReporter' 'GetText' 'Environments'
>  ) do: [:pkgName|
>    (MCPackage named: pkgName) unload.
>    MCMcmUpdater disableUpdatesOfPackage: pkgName.
>    ].
>  "Traits use custom unload"
>  self
>   at: #Trait
>   ifPresent: [ : aClass | aClass unloadTraits ]
> And we get rid of more packages.
>  Of course we must be careful of go back to previous version of methods
> concerningto Environments

Environments is a very low level package. It should be one of the
least unloadable packages (because of its nature). For instance, you
should need to remove 'Tools' before you can think of removing
Environments, because Squeak 4.5 is all about Environments, and making
the tools use them.


More information about the Squeak-dev mailing list