Hi Future You,<br>
<br>
FYIO, I have filed https://github.com/Metacello/metacello/issues/555 (Gofer-Core.squeak-ct.136.mcz) which would fix Gofer's extension method by marking it as a proper override and integrating Tony's changes. It just needs to be merged by Dale or anyone else with write access. :-)<br>
<br>
<b>==================== Summary ====================</b><br>
<br>
Name: Gofer-Core.squeak-ct.136<br>
Author: ct<br>
Time: 14 September 2022, 11:04:24.862009 am<br>
UUID: 125a7550-6d87-ff45-9717-3ae4694acda0<br>
Ancestors: Gofer-Core.squeak-dkh.135<br>
<br>
Updates extension method SystemOrganizer>>#environment to complement System-tonyg.1224 for Squeak. If the environment variable is not available, the code will still compile with a nil literal for environment, falling back to the prior logic. Marks the method as proper override.<br>
<br>
<b>=============== Diff against Gofer-Core.squeak-dkh.135 ===============</b><br>
<br>
<b>SystemOrganizer>>environment {*Gofer-Core-accessing-override} · ct 9/14/2022 11:01 (changed and recategorized)</b><br>
environment<br>
<s><font color="#0000FF">- <br>
-     ^Smalltalk<br>
</font></s><font color="#FF0000">+     ^ environment ifNil: [Smalltalk]</font><br>
<br>
Best,<br>
Christoph<br>
<br>
<font color="#808080">---<br>
</font><font color="#808080"><i>Sent from </i></font><font color="#808080"><i><a href="https://github.com/hpi-swa-lab/squeak-inbox-talk"><u><font color="#808080">Squeak Inbox Talk</font></u></a></i></font><br>
<br>
On 2021-06-30T14:02:29+02:00, marcel.taeumel@hpi.de wrote:<br>
<br>
> Note to Future Me: The Metacello bootstrap code patches its own version of SystemOrganizer >> #environment into the image.<br>
> <br>
> See:<br>
> Installer class >> #ensureRecentMetacello<br>
> Installer class >> #gemsource<br>
> http://seaside.gemtalksystems.com/ss/metacello.html<br>
> Gofer-Code.squeak-dkh.135<br>
> <br>
> <br>
> Best,<br>
> Present Me<br>
> Am 29.03.2021 10:23:41 schrieb commits at source.squeak.org <commits at source.squeak.org>:<br>
> Tony Garnock-Jones uploaded a new version of System to project The Trunk:<br>
> http://source.squeak.org/trunk/System-tonyg.1224.mcz<br>
> <br>
> ==================== Summary ====================<br>
> <br>
> Name: System-tonyg.1224<br>
> Author: tonyg<br>
> Time: 29 March 2021, 10:15:02.279821 am<br>
> UUID: 9d897d72-46fc-4205-a27b-89c7a50ac104<br>
> Ancestors: System-mt.1223<br>
> <br>
> Teach SystemOrganizer about multiple environments.<br>
> <br>
> =============== Diff against System-mt.1223 ===============<br>
> <br>
> Item was changed:<br>
> Categorizer subclass: #SystemOrganizer<br>
> + instanceVariableNames: 'environment'<br>
> - instanceVariableNames: ''<br>
> classVariableNames: ''<br>
> poolDictionaries: ''<br>
> category: 'System-Support'!<br>
> <br>
> !SystemOrganizer commentStamp: '' prior: 0!<br>
> My instances provide an organization for the classes in the system, just as a ClassOrganizer organizes the messages within a class. The only difference is the methods for fileIn/Out.!<br>
> <br>
> Item was changed:<br>
> ----- Method: SystemOrganizer>>classesIn: (in category 'query') -----<br>
> classesIn: categoryName<br>
> <br>
> | classes |<br>
> classes := OrderedCollection new.<br>
> self categories withIndexCollect: [:cat :idx |<br>
> (categoryName match: cat)<br>
> ifTrue: [classes addAll: (self listAtCategoryNumber: idx)]<br>
> ifFalse: [nil]].<br>
> + ^ classes collect: [:clsName | self environment classNamed: clsName]!<br>
> - ^ classes collect: [:clsName | Smalltalk classNamed: clsName]!<br>
> <br>
> Item was changed:<br>
> ----- Method: SystemOrganizer>>classify:under: (in category 'accessing') -----<br>
> classify: element under: newCategory<br>
> | oldCategory class |<br>
> self flag: #environments. "do we want notifications for classes in other environments?"<br>
> oldCategory := self categoryOfElement: element.<br>
> super classify: element under: newCategory.<br>
> + class := self environment at: element ifAbsent: [^ self].<br>
> - class := Smalltalk at: element ifAbsent: [^ self].<br>
> self == SystemOrganization ifTrue: [<br>
> SystemChangeNotifier uniqueInstance<br>
> class: class<br>
> recategorizedFrom: oldCategory<br>
> to: newCategory]!<br>
> <br>
> Item was changed:<br>
> ----- Method: SystemOrganizer>>commentInventory: (in category 'query') -----<br>
> commentInventory: categoryName<br>
> <br>
> "SystemOrganization commentInventory: 'Morphic*'"<br>
> <br>
> | classes commentedClasses |<br>
> classes := OrderedCollection new.<br>
> self categories withIndexCollect: [:cat :idx |<br>
> (categoryName match: cat)<br>
> ifTrue: [classes addAll: (self listAtCategoryNumber: idx)]<br>
> ifFalse: [nil]].<br>
> + commentedClasses := classes select: [:catCls | (self environment at: catCls) hasComment].<br>
> - commentedClasses := classes select: [:catCls | (Smalltalk at: catCls) hasComment].<br>
> ^ 'There are ' , classes size asString , ' classes in ' , categoryName ,<br>
> ' of which ' , commentedClasses size asString , ' have comments and ',<br>
> (classes size - commentedClasses size) asString , ' do not yet have comments.'<br>
> !<br>
> <br>
> Item was added:<br>
> + ----- Method: SystemOrganizer>>environment (in category 'accessing') -----<br>
> + environment<br>
> + ^ environment ifNil: [Smalltalk globals]!<br>
> <br>
> Item was added:<br>
> + ----- Method: SystemOrganizer>>environment: (in category 'accessing') -----<br>
> + environment: anEnvironment<br>
> + environment := anEnvironment!<br>
> <br>
> Item was changed:<br>
> ----- Method: SystemOrganizer>>fileOutCategory:on:initializing: (in category 'fileIn/Out') -----<br>
> fileOutCategory: category on: aFileStream initializing: aBool<br>
> "Store on the file associated with aFileStream, all the traits and classes associated<br>
> with the category and any requested shared pools in the right order."<br>
> <br>
> | first poolSet tempClass classes traits |<br>
> traits := self orderedTraitsIn: category.<br>
> classes := self superclassOrder: category.<br>
> poolSet := Set new.<br>
> classes do: [:class | class sharedPools do: [:eachPool | poolSet add: eachPool]].<br>
> poolSet size > 0 ifTrue: [<br>
> tempClass := Class new.<br>
> tempClass shouldFileOutPools ifTrue: [<br>
> poolSet := poolSet select: [:aPool |<br>
> + tempClass shouldFileOutPool: (self environment keyAtIdentityValue: aPool)].<br>
> - tempClass shouldFileOutPool: (Smalltalk globals keyAtIdentityValue: aPool)].<br>
> poolSet do: [:aPool | tempClass fileOutPool: aPool onFileStream: aFileStream]]].<br>
> first := true.<br>
> traits, classes do: [:each |<br>
> first<br>
> ifTrue: [first := false]<br>
> ifFalse: [aFileStream cr; nextPut: Character newPage; cr].<br>
> each<br>
> fileOutOn: aFileStream<br>
> moveSource: false<br>
> toFile: 0<br>
> initializing: false].<br>
> aBool ifTrue: [classes do: [:cls | cls fileOutInitializerOn: aFileStream]].!<br>
> <br>
> Item was changed:<br>
> ----- Method: SystemOrganizer>>orderedTraitsIn: (in category 'fileIn/Out') -----<br>
> orderedTraitsIn: category<br>
> "Answer an OrderedCollection containing references to the traits in the<br>
> category whose name is the argument, category (a string). The traits<br>
> are ordered so they can be filed in."<br>
> <br>
> | behaviors traits |<br>
> behaviors := (self listAtCategoryNamed: category asSymbol)<br>
> + collect: [:title | self environment at: title].<br>
> - collect: [:title | Smalltalk at: title].<br>
> traits := behaviors reject: [:each | each isBehavior].<br>
> ^traits asArray sort: [:t1 :t2 |<br>
> (t2 traitComposition allTraits includes: t1)<br>
> or: [(t1 traitComposition allTraits includes: t2) not]]!<br>
> <br>
> Item was changed:<br>
> ----- Method: SystemOrganizer>>removeMissingClasses (in category 'remove') -----<br>
> removeMissingClasses<br>
> "Remove any class names that are no longer in the Smalltalk dictionary. Used for cleaning up after garbage collecting user-generated classes."<br>
> "SystemOrganization removeMissingClasses"<br>
> <br>
> elementArray copy do: [:el |<br>
> + (self environment includesKey: el) ifFalse: [self removeElement: el]].<br>
> - (Smalltalk includesKey: el) ifFalse: [self removeElement: el]].<br>
> !<br>
> <br>
> Item was changed:<br>
> ----- Method: SystemOrganizer>>superclassOrder: (in category 'fileIn/Out') -----<br>
> superclassOrder: category<br>
> "Answer an OrderedCollection containing references to the classes in the<br>
> category whose name is the argument, category (a string). The classes<br>
> are ordered with superclasses first so they can be filed in."<br>
> <br>
> | behaviors classes |<br>
> behaviors := (self listAtCategoryNamed: category asSymbol)<br>
> + collect: [:title | self environment at: title].<br>
> - collect: [:title | Smalltalk at: title].<br>
> classes := behaviors select: [:each | each isBehavior].<br>
> ^ChangeSet superclassOrder: classes!<br>
> <br>
> <br>
> -------------- next part --------------<br>
> An HTML attachment was scrubbed...<br>
> URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210630/79f1a3c1/attachment.html><br>
> <br>
> <br>
["Gofer-Core.squeak-ct.136.mcz"]