Chris Cunningham uploaded a new version of Squeak-Version to project The Inbox:
http://source.squeak.org/inbox/Squeak-Version-cbc.5132.mcz ==================== Summary ==================== Name: Squeak-Version-cbc.5132 Author: cbc Time: 25 January 2018, 1:22:39.044095 pm UUID: 9d1afcba-a654-d04d-b823-7a1487ee0c78 Ancestors: Squeak-Version-mt.5131 Add class SqueakVersion to hold documentation about this package - how to use, why to use. Also, remove previous preamble/postscript, since they are forced in a load prior to this one. Finally, added to postscript the removal of the packages (Exceptions, FlexibleVocabularies, ScriptLoader) from the image. =============== Diff against Squeak-Version-mt.5131 =============== Item was removed: - (PackageInfo named: 'Squeak-Version') preamble: '"This is a hack to finalize #MethodContext -> Context renaming. - The #bootstrapContext left two problems: - 1) there is a binding #MethodContext => Context. - 2) ContextPart still think it has Context as subclass, though this one changed its superclass. - We must make sure that the removal of these class won''t destroy Context." - - Smalltalk globals unbind: #MethodContext. - [Undeclared at: #MethodContext put: Context copy] on: AttemptToWriteReadOnlyGlobal do: [:exc | exc resume: true]. - - ContextPart ifNil: [^self]. - ContextPart isBehavior ifFalse: [^self]. - ContextPart instVarAt: 6 put: (ContextPart subclasses select: [:e | e superclass = ContextPart]) - '! Item was added: + SystemOrganization addCategory: #'Squeak-Version'! Item was added: + Object subclass: #SqueakVersion + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'Squeak-Version'! + + !SqueakVersion commentStamp: 'cbc 1/25/2018 11:57' prior: 0! + This class exists soley as a description of this package, and how it should be used. + + When a package is removed from the trunk update process, you will need to increase the version number of the Squeak-Version package (this one) by the version number of the package removed + 1. This ensures that the trunk build number keeps increasing. + + An example: + When you unload a package, let's say Universes-mt.48, you add 49 (48 + 1) to the version number of Squeak-Version and save it. + Additionally, add in the package postscript the code to actually unload the package from the image as well: + ---------- package postscript ---------- + (MCPackage named: 'Universes') unload. + + Why is this important? + + The Squeak Trunk update (build) number (or Squeak "version") is thesum of versions of all the base packages. + This works great as long as we update packages and occassionally add new packages to Trunk. + However, when we remove packages from the base system, we must bump Squeak-Version's version by the removed package's version number, so that the aggregate version number doesn't decrease. + + In addition, folks have started to use the postscript of this package to actually remove the packages from the image that are removed from the Trunk updating process. This is especially useful if the package is empty before it was removed - then it removes cruft from users images. + ! Item was changed: + (PackageInfo named: 'Squeak-Version') postscript: '#( ''Exceptions'' ''FlexibleVocabularies'' ''ScriptLoader'' ) do: [:package| + (MCPackage named: package) workingCopy unload. + (MCPackage named: package) workingCopy unregister. + ].'! - (PackageInfo named: 'Squeak-Version') postscript: '(MCPackage named: ''311Deprecated'') unload. - (MCPackage named: ''SmallLand-ColorTheme'') unload.'! |
Hi.
this package is in response to Eliot's suggestion to document what Squeak-Version is. This is based off of Levente's message describing the reason for the package, with some rewriting and additions (my own). Please correct as needed - I won't be offended at all. Also, it adds in the final removal of the package from the images as well - following prior practice for this package. -cbc ---------- Forwarded message ---------- From: <[hidden email]> Date: Thu, Jan 25, 2018 at 1:22 PM Subject: [squeak-dev] The Inbox: Squeak-Version-cbc.5132.mcz To: [hidden email] Chris Cunningham uploaded a new version of Squeak-Version to project The Inbox: http://source.squeak.org/inbox ==================== Summary ==================== Name: Squeak-Version-cbc.5132 Author: cbc Time: 25 January 2018, 1:22:39.044095 pm UUID: 9d1afcba-a654-d04d-b823-7a1487 Ancestors: Squeak-Version-mt.5131 Add class SqueakVersion to hold documentation about this package - how to use, why to use. Also, remove previous preamble/postscript, since they are forced in a load prior to this one. Finally, added to postscript the removal of the packages (Exceptions, FlexibleVocabularies, ScriptLoader) from the image. =============== Diff against Squeak-Version-mt.5131 =============== Item was removed: - (PackageInfo named: 'Squeak-Version') preamble: '"This is a hack to finalize #MethodContext -> Context renaming. - The #bootstrapContext left two problems: - 1) there is a binding #MethodContext => Context. - 2) ContextPart still think it has Context as subclass, though this one changed its superclass. - We must make sure that the removal of these class won''t destroy Context." - - Smalltalk globals unbind: #MethodContext. - [Undeclared at: #MethodContext put: Context copy] on: AttemptToWriteReadOnlyGlobal do: [:exc | exc resume: true]. - - ContextPart ifNil: [^self]. - ContextPart isBehavior ifFalse: [^self]. - ContextPart instVarAt: 6 put: (ContextPart subclasses select: [:e | e superclass = ContextPart]) - '! Item was added: + SystemOrganization addCategory: #'Squeak-Version'! Item was added: + Object subclass: #SqueakVersion + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'Squeak-Version'! + + !SqueakVersion commentStamp: 'cbc 1/25/2018 11:57' prior: 0! + This class exists soley as a description of this package, and how it should be used. + + When a package is removed from the trunk update process, you will need to increase the version number of the Squeak-Version package (this one) by the version number of the package removed + 1. This ensures that the trunk build number keeps increasing. + + An example: + When you unload a package, let's say Universes-mt.48, you add 49 (48 + 1) to the version number of Squeak-Version and save it. + Additionally, add in the package postscript the code to actually unload the package from the image as well: + ---------- package postscript ---------- + (MCPackage named: 'Universes') unload. + + Why is this important? + + The Squeak Trunk update (build) number (or Squeak "version") is thesum of versions of all the base packages. + This works great as long as we update packages and occassionally add new packages to Trunk. + However, when we remove packages from the base system, we must bump Squeak-Version's version by the removed package's version number, so that the aggregate version number doesn't decrease. + + In addition, folks have started to use the postscript of this package to actually remove the packages from the image that are removed from the Trunk updating process. This is especially useful if the package is empty before it was removed - then it removes cruft from users images. + ! Item was changed: + (PackageInfo named: 'Squeak-Version') postscript: '#( ''Exceptions'' ''FlexibleVocabularies'' ''ScriptLoader'' ) do: [:package| + (MCPackage named: package) workingCopy unload. + (MCPackage named: package) workingCopy unregister. + ].'! - (PackageInfo named: 'Squeak-Version') postscript: '(MCPackage named: ''311Deprecated'') unload. - (MCPackage named: ''SmallLand-ColorTheme'') unload.'! |
Free forum by Nabble | Edit this page |