Marcel Taeumel uploaded a new version of SystemReporter to project The Trunk:
http://source.squeak.org/trunk/SystemReporter-mt.49.mcz ==================== Summary ==================== Name: SystemReporter-mt.49 Author: mt Time: 17 February 2021, 5:08:25.667893 pm UUID: 29b81ef5-5233-3c4f-981d-2c8205f4ce49 Ancestors: SystemReporter-eem.48 Adds report about "Image Packages" to help organize all code artifacts in your personal working image. =============== Diff against SystemReporter-eem.48 =============== Item was changed: ----- Method: SystemReporter>>initialize (in category 'initialize-release') ----- initialize self add: #'Contributors' method: #reportContributors; add: #Image method: #reportImage; add: #'Image Parameters' method: #reportImageParameters; add: #'Image Sources' method: #reportSources; add: #'Image Preferences' method: #reportPreferences; + add: #'Image Packages' method: #reportImagePackages; add: #'MC Repositories' method: #reportRepositories; add: #'MC Working Copies' method: #reportWorkingCopies; add: #'VM General' method: #reportVM; add: #'VM Options' method: #reportVMOptions; add: #'VM Modules' method: #reportModules; add: #'VM Parameters' method: #reportVMParameters; add: #'VM Stats' method: #reportVMStats. Smalltalk os platformName = 'Win32' ifTrue: [ self add: #'VM Configuration' method: #reportWin32VMConfig. ]. self add: #'OS General' method: #reportOS. Smalltalk os platformName = 'Win32' ifTrue: [ self add: #'OS Details' method: #reportWin32OSDetails; add: #'Hardware Details' method: #reportWin32HardwareDetails; add: #'GFX Hardware Details' method: #reportWin32GFXDetails. ]. Smalltalk os osVersion = 'linux' ifTrue: [ self add: #'OS Details' method: #reportLinuxOSDetails ]. self add: #'Tiny Benchmarks' method: #reportTinyBenchmarks; add: #'Space Analysis' method: #reportSpaceAnalysis; add: #'SUnit' method: #reportTestRunner; add: #'Debug Log' method: #reportDebugLog. categoriesSelected := Set with: #Image with: #'VM General'. self updateReport ! Item was added: + ----- Method: SystemReporter>>reportImagePackages: (in category 'reporting') ----- + reportImagePackages: aStream + + | organizer trunk treated inbox release releaseRepo attribute others | + organizer := PackageOrganizer default. + + self header: 'System Categories with Unknown Package' on: aStream. + SystemOrganization categories + select: [:category | (organizer packageOfSystemCategory: category ifNone: []) isNil] + thenDo: [:category | aStream nextPutAll: category; cr]. + + aStream cr. + self header: 'Packages with Only Cache Repository' on: aStream. + organizer packages + select: [:package | + | repos | + repos := package mcPackage workingCopy repositoryGroup repositories. + repos size = 1 and: [repos first == MCRepository packageCache]] + thenDo: [:package | aStream nextPutAll: package mcPackage workingCopy description; cr]. + + aStream cr. + self header: 'Official Packages' on: aStream. + others := OrderedCollection new. + trunk := MCRepository trunk allVersionNames. + inbox := MCRepository inbox allVersionNames. + treated := MCRepository treated allVersionNames. + releaseRepo := [[ReleaseBuilder releaseRepository] valueSupplyingAnswer: {'*'. true}] on: ReleaseBuilderFailed do: [:ex | nil]. + release := releaseRepo ifNotNil: [:repo | repo allVersionNames] ifNil: [#()]. + + (organizer packages sorted: [:a :b | a packageName <= b packageName]) + collect: [:package | package mcPackage workingCopy] + thenDo: [:workingCopy | | version repo | + version := workingCopy ancestry ancestors ifNotEmpty: [:a | a first]. + version ifNotNil: [version := version name]. + attribute := TextEmphasis normal. + (release includes: version) + ifTrue: [repo := releaseRepo] + ifFalse: [(trunk includes: version) + ifTrue: [repo := MCRepository trunk] + ifFalse: [(inbox includes: version) + ifTrue: [repo := MCRepository inbox. attribute := TextEmphasis bold] + ifFalse: [(treated includes: version) + ifTrue: [repo := treated. attribute := TextColor gray] + ifFalse: [others add: workingCopy]]]. + repo ifNotNil: [ "Only official packages here." + aStream withAttribute: attribute do: [ + aStream + nextPutAll: workingCopy description; + nextPutAll: ' --- '; + nextPutAll: repo description; cr]]]]. + + aStream cr. + self header: 'Other Packages' on: aStream. + others + select: [:workingCopy | workingCopy repositoryGroup repositories size > 1] + thenDo: [:workingCopy | + aStream + nextPutAll: workingCopy description; + nextPutAll: ' --- '; + nextPutAll: workingCopy repositoryGroup repositories second description; cr] + ! |
|
I wanted to figure out which inbox code I already loaded into my image.
|
This is nice. It would be really nice if the Monticello Browser also noted from which repository the packages were loaded from. That would have been my first place to look for information like this - and, of course, not find it. On Wed, Feb 17, 2021 at 8:15 AM Marcel Taeumel <[hidden email]> wrote:
|
Hi Chris. > It would be really nice if the Monticello Browser also noted from which repository the packages were loaded from. That would have been my first place to look for information like this - and, of course, not find it. Hmm... maybe it would be possible with "a clever caching strategy" (tm) :-D -- It doesn't take *that* long to fetch the list of file names from a file-based repository. Best, Marcel
|
Hi Marcel,
It's an unscalable part of the model, and growing at a good clip. :) Selecting a package in the Monticello browser shows the repositories it was loaded from in the right pane. Part of the WorkingCopy model. - Chris |
Free forum by Nabble | Edit this page |