Obsolete PackageInfos Was: [squeak-dev] The Inbox: Monticello-bp.406.mcz

Bernhard Pieber bernhard at pieber.com
Sun Oct 31 16:53:59 UTC 2010


I am trying to understand the class PackageInfo better, especially where its instances are held. There seem to be two places in the image.

1. PackageOrganizer default packages - This is in the PackageInfo-Base package and therefore is independent of Monticello. You can see this list if you do PackageList open. Does anyone use that UI? If yes, what for?
2. MCWorkingCopy registry collect: [:each | each packageInfo] - This is the list of PackageInfos Monticello knows about and shows in the Monticello Browser.

In the current trunk image the first list is larger than the second, there are 24 PackageInfos Monticello does not know about:
(PackageInfo allPackages difference: (MCWorkingCopy registry collect: [:each | each packageInfo]))

I cannot think of any use for those, so I think they are obsolete. I found a message send to remove them: MCWorkingCopy flushObsoletePackageInfos. I took some code from there and created a query method obsoletePackageInfos. I think this is useful. What do you think?

IMO MCWorkingCopy flushObsoletePackageInfos should be called in the trunk image. What do you think about that?

Cheers,
Bernhard

Am 31.10.2010 um 15:55 schrieb commits at source.squeak.org:
> A new version of Monticello was added to project The Inbox:
> http://source.squeak.org/inbox/Monticello-bp.406.mcz
> 
> ==================== Summary ====================
> 
> Name: Monticello-bp.406
> Author: bp
> Time: 31 October 2010, 4:38:59.454 pm
> UUID: 2bc8f189-09ca-4471-b0fe-89c70f4f379d
> Ancestors: Monticello-nice.405
> 
> added obsoletePackageInfos
> 
> =============== Diff against Monticello-nice.405 ===============
> 
> Item was added:
> + ----- Method: MCPackageManager class>>obsoletePackageInfos (in category 'cleanup') -----
> + obsoletePackageInfos
> + 	"Answer all PackageInfos that are not associated with an MCPackageManager."
> + 	| pkgNames |
> + 	pkgNames := self allManagers collect: [:wcs | wcs packageName] as: Set.
> + 	^PackageOrganizer default packages select: [:p |
> + 		p class isObsolete or: [(pkgNames includes: p packageName) not]]!
> 
> 




More information about the Squeak-dev mailing list