Marcel Taeumel uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-jr.855.mcz
==================== Summary ====================
Name: Collections-jr.855
Author: jr
Time: 25 September 2019, 3:23:14.995261 pm
UUID: 9a5b562f-ca9a-624c-9012-7840cb25db4e
Ancestors: Collections-mt.854
Catch the lookup of nil in WeakKeyDictionary
While no nil key can be added, keys become nil when they are garbage collected. This must not let nil accidentally "inherit" the value of such a stale association.
It only happens in unfortunate situations when nil and the collected key would hash to the same place in the hash table (array). Yet it does happen.
=============== Diff against Collections-mt.854 ===============
Item was added:
+ ----- Method: WeakKeyDictionary>>at:ifAbsent: (in category 'accessing') -----
+ at: key ifAbsent: aBlock
+ "While no nil key can be added, keys become nil when they are garbage collected.
+ This must not let nil accidentally 'inherit' the value of such a stale association."
+ key ifNil: [^ aBlock value].
+ ^ super at: key ifAbsent: aBlock!
A new version of CollectionsTests was added to project The Inbox:
http://source.squeak.org/inbox/CollectionsTests-jr.320.mcz
==================== Summary ====================
Name: CollectionsTests-jr.320
Author: jr
Time: 25 September 2019, 3:41:23.707261 pm
UUID: 54df98c0-c984-3b45-b189-dc267b743422
Ancestors: CollectionsTests-dtl.318
Add test for change in Collections-jr.855
=============== Diff against CollectionsTests-dtl.318 ===============
Item was added:
+ ClassTestCase subclass: #WeakKeyDictionaryTest
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'CollectionsTests-Weak'!
Item was added:
+ ----- Method: WeakKeyDictionaryTest>>testNilDoesNotInheritValueOfGarbageCollectedObject (in category 'tests') -----
+ testNilDoesNotInheritValueOfGarbageCollectedObject
+ "When the keys are garbage collected, they become nil in the associations.
+ This must not mislead the dictionary to answer that nil had one of the values of these
+ associations!!"
+ | dictionary hashTable |
+ dictionary := self targetClass new.
+ "Craft a hash table where all keys were freed."
+ hashTable := dictionary array.
+ self assert: hashTable size > 0.
+ hashTable replace: [:each | WeakKeyAssociation key: nil value: 1].
+ self assert: (dictionary at: nil ifAbsent: []) isNil. "and not 1"!
A new version of CollectionsTests was added to project The Inbox:
http://source.squeak.org/inbox/CollectionsTests-jr.319.mcz
==================== Summary ====================
Name: CollectionsTests-jr.319
Author: jr
Time: 25 September 2019, 3:24:53.304261 pm
UUID: f44f2265-88ab-3042-b84f-bdb5bbd8b8ef
Ancestors: CollectionsTests-dtl.318
Add test for change in Collections-jr.855
=============== Diff against CollectionsTests-dtl.318 ===============
Item was added:
+ ClassTestCase subclass: #WeakKeyDictionaryTest
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'CollectionsTests-Weak'!
Item was added:
+ ----- Method: WeakKeyDictionaryTest>>testNilDoesNotInheritValueOfGarbageCollectedObject (in category 'tests') -----
+ testNilDoesNotInheritValueOfGarbageCollectedObject
+ "When objects are garbage collected, the keys in the names hash table become nil.
+ This must not mislead the dictionary to answer that nil had one of the values of the former
+ objects!!"
+ | dictionary hashTable |
+ dictionary := self targetClass new.
+ "Craft a hash table where all keys were freed."
+ hashTable := dictionary array.
+ self assert: hashTable size > 0.
+ hashTable replace: [:each | WeakKeyAssociation key: nil value: 1].
+ self assert: (dictionary at: nil ifAbsent: []) isNil. "and not 1"!
A new version of Collections was added to project The Inbox:
http://source.squeak.org/inbox/Collections-jr.855.mcz
==================== Summary ====================
Name: Collections-jr.855
Author: jr
Time: 25 September 2019, 3:23:14.995261 pm
UUID: 9a5b562f-ca9a-624c-9012-7840cb25db4e
Ancestors: Collections-mt.854
Catch the lookup of nil in WeakKeyDictionary
While no nil key can be added, keys become nil when they are garbage collected. This must not let nil accidentally "inherit" the value of such a stale association.
It only happens in unfortunate situations when nil and the collected key would hash to the same place in the hash table (array). Yet it does happen.
=============== Diff against Collections-mt.854 ===============
Item was added:
+ ----- Method: WeakKeyDictionary>>at:ifAbsent: (in category 'accessing') -----
+ at: key ifAbsent: aBlock
+ "While no nil key can be added, keys become nil when they are garbage collected.
+ This must not let nil accidentally 'inherit' the value of such a stale association."
+ key ifNil: [^ aBlock value].
+ ^ super at: key ifAbsent: aBlock!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1541.mcz
==================== Summary ====================
Name: Morphic-mt.1541
Author: mt
Time: 25 September 2019, 11:24:23.707838 am
UUID: 077a67ab-387d-a449-b28f-518ba8f9eda4
Ancestors: Morphic-mt.1540
Fixes #subProjects to not only rely on project viewers.
=============== Diff against Morphic-mt.1540 ===============
Item was changed:
----- Method: MorphicProject>>subProjects (in category 'subprojects') -----
subProjects
"Answer a list of all the subprojects of the receiver. "
+ ^ (super subProjects, (world submorphs
- self flag: #fix. "mt: Collect other projects that have this as parent. See Project >> #allProjects"
- ^world submorphs
select: [:m | (m isSystemWindow) and: [m model isKindOf: Project]]
+ thenCollect: [:m | m model])) asSet asArray.!
- thenCollect: [:m | m model].!
Marcel Taeumel uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-mt.241.mcz
==================== Summary ====================
Name: ST80-mt.241
Author: mt
Time: 25 September 2019, 11:23:50.807838 am
UUID: f846aea5-4fcf-304c-b51e-8d99299a2662
Ancestors: ST80-mt.240
Fixes #subProjects to not only rely on project viewers.
=============== Diff against ST80-mt.240 ===============
Item was changed:
----- Method: MVCProject>>subProjects (in category 'utilities') -----
subProjects
"Answer a list of all the subprojects of the receiver. "
+ ^ (super subProjects, ((self world controllersSatisfying: [:m | m model isKindOf: Project])
+ collect: [:controller | controller model])) asSet asArray!
- ^ (self world controllersSatisfying: [:m | m model isKindOf: Project])
- collect: [:controller | controller model]!
Marcel Taeumel uploaded a new version of ReleaseBuilder to project The Trunk:
http://source.squeak.org/trunk/ReleaseBuilder-mt.200.mcz
==================== Summary ====================
Name: ReleaseBuilder-mt.200
Author: mt
Time: 25 September 2019, 10:40:18.380838 am
UUID: 27babed0-e564-3247-ae21-049b92db4129
Ancestors: ReleaseBuilder-mt.199
Minor tweaks for constructing MVC->Morphic in the release.
=============== Diff against ReleaseBuilder-mt.199 ===============
Item was changed:
Object subclass: #ReleaseBuilder
instanceVariableNames: ''
classVariableNames: 'DeferredTask NextMajorVersion NextMinorVersion NextTask QAndA'
poolDictionaries: ''
category: 'ReleaseBuilder'!
+ !ReleaseBuilder commentStamp: 'mt 9/25/2019 09:30' prior: 0!
- !ReleaseBuilder commentStamp: 'mt 6/22/2016 18:08' prior: 0!
I'm the script that prepares a trunk image for release.
Just do "ReleaseBuilder doNextStep" repeatedly until the next release is done.
For the final release step:
+ - If you want to try it locally, change #releaseLocally to return true.
+ - Most of the code operates (read-only) on the #buildRepository, which is usually the trunk. For releases, there is a #releaseRepository, to which some package versions will be copied from trunk.!
- - If you want to try it locally, change #localBuild to return true.
- - Most of the code operates (read-only) on the build repository, which is usually the trunk. For releases, there is a release repository, to which some package versions will be copied from trunk.!
Item was removed:
- ----- Method: ReleaseBuilder class>>addMVCParentProject (in category 'scripts - support') -----
- addMVCParentProject
- "The home project is a single Morphic project. Let the home project have a
- parent MVC project as the root of the project tree. The MVC project supports
- emergency debugging in the event of unrecoverable Morphic problems, and
- will fall back on the traditional emergency evaluator if MVC debugging fails.
- If MVC is not installed in the image, then do nothing."
-
- (Smalltalk hasClassNamed:#MVCProject) ifTrue: [ | cls |
- cls := Smalltalk classNamed: #MVCProject.
- ((Project topProject) perform: #isMVC)
- ifFalse: [(cls new name: 'The root project') beTopProject ] ].
- !
Item was removed:
- ----- Method: ReleaseBuilder class>>checkCurrentProjects (in category 'scripts - support') -----
- checkCurrentProjects
-
- Project current isMorphic ifFalse: [
- Warning signal: 'The current project is not Morphic. Please create a new Morphic project, enter it, and restart the release building process.'].
-
- Project allProjects size
- caseOf: {
- [ 1 ] -> [ self addMVCParentProject ] .
- [ 2 ] -> [ ((Project current parent) perform: #isMVC) ifFalse: [ Warning signal: 'Parent of the home project should be an MVC project.' ] ] }
- otherwise: [ Warning signal: 'There should be one home Morphic project with a parent MVC project for fallback debugging.' ] .
-
- "Avoid strange drawing issues."
- Project current world allMorphsDo: [:m | m removeProperty: #errorOnDraw].!
Item was changed:
----- Method: ReleaseBuilder class>>configureDesktop (in category 'scripts') -----
configureDesktop
"Open tools, multimedia content, etc."
self setDisplayExtent: 1024 @ 768.
self setProjectBackground: Color darkGray.
(UserInterfaceTheme named: 'Squeak') apply.
self deleteAllWindows.
self deleteAllOtherMorphs.
+ "Avoid strange drawing issues."
+ Project current world allMorphsDo: [:m | m removeProperty: #errorOnDraw].
+
"Replace docking bar instance in case its code has changed."
Project current removeMainDockingBar.
TheWorldMainDockingBar updateInstances.!
Item was added:
+ ----- Method: ReleaseBuilder class>>configureProjects (in category 'scripts') -----
+ configureProjects
+ "Set up the desired configuration of projects, which might be a single project, multiple projects..."
+
+ | homeProject rootProject |
+ homeProject := Project current.
+ rootProject := homeProject.
+
+ homeProject isMorphic ifFalse: [
+ Warning signal: 'The current project is not Morphic. Please create a new Morphic project, enter it, and restart the release building process.'].
+
+ "The home project is a single Morphic project. Let the home project have a parent MVC project as the root of the project tree. The MVC project supports emergency debugging in the event of unrecoverable Morphic problems, and will fall back on the traditional emergency evaluator if MVC debugging fails. If MVC is not installed in the image, then do nothing."
+ Project current removeAllOtherProjects.
+ (Smalltalk classNamed: #MVCProject)
+ ifNil: [Warning signal: 'MVC must be installed in the release image.']
+ ifNotNil: [:mvc | rootProject := (mvc new name: 'The root project')].
+
+ self
+ assert: homeProject isTopProject;
+ assert: rootProject isTopProject not.
+
+ rootProject beTopProject.
+
+ self
+ assert: rootProject isTopProject;
+ assert: homeProject isTopProject not.
+
+ self
+ assert: rootProject subProjects size = 1;
+ assert: homeProject parent == rootProject;
+ assert: rootProject isMVC.!
Item was removed:
- ----- Method: ReleaseBuilder class>>ensureMorphicTopProject (in category 'scripts - support') -----
- ensureMorphicTopProject
-
- Project current isMorphic ifFalse: [
- Warning signal: 'The current project is not Morphic. A new Morphic project will be created and entered. Please restart the release building process after that.'.
- MorphicProject new enter "current process terminates after this"].!
Item was changed:
----- Method: ReleaseBuilder class>>prepareEnvironment (in category 'preparing') -----
prepareEnvironment
"Prepare everything that should be done for a new image build. Clear caches, passwords, etc."
- "ReleaseBuilder prepareNewBuild"
| balloon |
self
clearCaches;
+ configureProjects;
- checkCurrentProjects;
configureTools;
setPreferences;
configureDesktop.
balloon := self getBalloonForm. "Get now because later the file might be missing."
DeferredTask := [
self openWelcomeWorkspacesWith: balloon.
PreferenceWizardMorph open].
"If you save-and-quit the image after calling #prepareEnvironment, ensure that the next image startup will be fast."
Project current world doOneCycle.!
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1101.mcz
==================== Summary ====================
Name: System-mt.1101
Author: mt
Time: 25 September 2019, 10:39:08.307838 am
UUID: c829ba68-0ccb-d34e-aa5a-9a8fe3496e25
Ancestors: System-mt.1100
Fixes #beTopProject, but disconnects visual project-viewer hierarchy from actual project tree. As backup project, avoid cycling between two broken project kinds but only follow project parents.
=============== Diff against System-mt.1100 ===============
Item was changed:
----- Method: Project class>>tryOtherProjectForRecovery: (in category 'error recovery') -----
tryOtherProjectForRecovery: errorMessage
"Try entering the parent project if it uses a different user interface. We determine this by comparing the project's class."
| safeProject nextProject |
nextProject := Project current.
safeProject := nil.
"Search parent projects for one of a different type"
[safeProject notNil or: [nextProject isTopProject]] whileFalse: [
nextProject := nextProject parent.
(Project current isKindOf: nextProject class)
ifFalse: [safeProject := nextProject]].
+
+ "September 2019 --- Do not cycle between Morphic and MVC if both break."
"No suitable parent project found, search all projects for any one of different type."
+ "safeProject ifNil: [Smalltalk garbageCollect.
- safeProject ifNil: [Smalltalk garbageCollect.
safeProject := Project allSubInstances
+ detect: [:proj | (proj isKindOf: Project current class) not] ifNone: []]."
+
- detect: [:proj | (proj isKindOf: Project current class) not] ifNone: []].
safeProject ifNotNil: [:p |
p enterForEmergencyRecovery.
"Active process will usually suspend after this."].
!
Item was changed:
----- Method: Project>>beTopProject (in category 'sub-projects & hierarchy') -----
beTopProject
+ | previousTop |
self isTopProject ifTrue: [^ self].
+ previousTop := self class topProject.
+
self parent deletingProject: self. "Just remove views and refs to me."
+ self addProject: previousTop. "The current top project will be my child now."
+ self setParent: self. "I am the new top project."!
- self addProject: self class topProject.
- self setParent: self.!
Item was changed:
----- Method: Project>>setParent: (in category 'sub-projects & hierarchy') -----
setParent: newParent
- "Notify the current parent to discard views and other references. Avoids deleting that project later if the former parent is deleted. You can only have one parent anyway.."
- (self parent isKindOf: Project) ifTrue: [
- self parent ~= newParent ifTrue: [self parent deletingProject: self].
- ].
-
parentProject := newParent.
nextProject := previousProject := nil.!
Marcel Taeumel uploaded a new version of ReleaseBuilder to project The Trunk:
http://source.squeak.org/trunk/ReleaseBuilder-dtl.198.mcz
==================== Summary ====================
Name: ReleaseBuilder-dtl.198
Author: dtl
Time: 18 September 2019, 10:37:49.461592 pm
UUID: 93409652-4167-4790-a02a-ec5e54f2c036
Ancestors: ReleaseBuilder-mt.197
When preparing a new release image, arrange for the home Morphic project to have a parent MVC project. The MVC project supports emergency debugging in the event of unrecoverable Morphic problems, and will fall back on the traditional emergency evaluator if MVC debugging fails.
=============== Diff against ReleaseBuilder-mt.197 ===============
Item was added:
+ ----- Method: ReleaseBuilder class>>addMVCParentProject (in category 'scripts - support') -----
+ addMVCParentProject
+ "The home project is a single Morphic project. Let the home project have a
+ parent MVC project as the root of the project tree. The MVC project supports
+ emergency debugging in the event of unrecoverable Morphic problems, and
+ will fall back on the traditional emergency evaluator if MVC debugging fails.
+ If MVC is not installed in the image, then do nothing."
+
+ (Smalltalk hasClassNamed:#MVCProject) ifTrue: [ | cls |
+ cls := Smalltalk classNamed: #MVCProject.
+ ((Project topProject) perform: #isMVC)
+ ifFalse: [(cls new name: 'The root project') beTopProject ] ].
+ !
Item was changed:
----- Method: ReleaseBuilder class>>checkCurrentProjects (in category 'scripts - support') -----
checkCurrentProjects
Project current isMorphic ifFalse: [
Warning signal: 'The current project is not Morphic. Please create a new Morphic project, enter it, and restart the release building process.'].
+ Project allProjects size
+ caseOf: {
+ [ 1 ] -> [ self addMVCParentProject ] .
+ [ 2 ] -> [ ((Project current parent) perform: #isMVC) ifFalse: [ Warning signal: 'Parent of the home project should be an MVC project.' ] ] }
+ otherwise: [ Warning signal: 'There should be one home Morphic project with a parent MVC project for fallback debugging.' ] .
- Project allProjects size = 1 ifFalse: [
- Warning signal: 'There should only be one project.'].
"Avoid strange drawing issues."
Project current world allMorphsDo: [:m | m removeProperty: #errorOnDraw].!