Chris Cunningham uploaded a new version of Squeak-Version to project The Trunk:
http://source.squeak.org/trunk/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.'! |
On Sat, 10 Feb 2018, [hidden email] wrote:
> Chris Cunningham uploaded a new version of Squeak-Version to project The Trunk: > http://source.squeak.org/trunk/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. Those scripts, preamble and postscript, are only evaluated when they have changed compared to their state before loading. So, if you load a new package, its preamble and postscript will be evaluated, but if you load a new version of that package with the same preamble and postscript, then the scripts won't be evaluated again. Levente > > 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.'! |
Right. So, the previous postscript was run (reliably, since it was also called in an update configuration). I then added the postscript to finalize unloading of the packages that were removed from the update configuration - especially since the last update removed all content from them. So, really, I updated the postscript, I guess. -cbc On Sat, Feb 10, 2018 at 11:38 AM, Levente Uzonyi <[hidden email]> wrote: On Sat, 10 Feb 2018, [hidden email] wrote: |
Actually, the good reason for removing the old unloads in the script is they are NOT run again once I added the new removals. Otherwise, if someone added back in one of the older package (for some unknown reason), the new commit would remove them again - which is not (and should not) be intended. -cbc On Sat, Feb 10, 2018 at 11:43 AM, Chris Cunningham <[hidden email]> wrote:
|
In reply to this post by Levente Uzonyi
Hi Levente, Hi All,
> On Feb 10, 2018, at 11:38 AM, Levente Uzonyi <[hidden email]> wrote: > >> On Sat, 10 Feb 2018, [hidden email] wrote: >> >> Chris Cunningham uploaded a new version of Squeak-Version to project The Trunk: >> http://source.squeak.org/trunk/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. > > Those scripts, preamble and postscript, are only evaluated when they have > changed compared to their state before loading. So, if you load a new package, its preamble and postscript will be evaluated, but if you load a new version of that package with the same preamble and postscript, then the scripts won't be evaluated again. I did not know this :-). Very nice. It needs to be documented. Two approaches appeal to me a) it would be in the default text for the scripts as a comment. Ideally that comment could not be removed, or would get added back when a script is cleared b) it would appear in the title or in a text box beneath the edit dialogue (like the method annotation pane) In general there is not enough user visible information for Monticello. The system is getting too big to assume that we've read all of it, so I think that areas which everyone uses as tools rather than as a library do need to be documented visibly. > Levente > >> >> 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.'! > |
> On 13-02-2018, at 7:29 AM, Eliot Miranda <[hidden email]> wrote: > > I did not know this :-). Very nice. It needs to be documented. This is pretty much the general problem for almost everything. Software is especially an issue and we are certainly no better than the rest of the industry. Reading code tells you (assuming it is written half-decently) what actually happens, if you can make enough sense of it. But if we all spent enough time reading all the code we try to use that could actually understand what it does we’d never have time to write any new code. And mostly we’d still not have much chance of understanding what the damned stuff was *meant* to do nor what it doesn’t quite do. Adele used to have a little saying that covers this (though a bit less effectively when nobody seems to think software should be paid for) “If it isn’t documented then it doesn’t exist. If it doesn’t exist, what the hell did we pay you for?" tim -- tim Rowledge; [hidden email]; http://www.rowledge.org/tim M$ are grinning pigs in a sea of buggy code - The Inquirer |
Free forum by Nabble | Edit this page |