[squeak-dev] The Trunk: ReleaseBuilder-mt.201.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Oct 9 12:42:18 UTC 2019


Marcel Taeumel uploaded a new version of ReleaseBuilder to project The Trunk:
http://source.squeak.org/trunk/ReleaseBuilder-mt.201.mcz

==================== Summary ====================

Name: ReleaseBuilder-mt.201
Author: mt
Time: 9 October 2019, 2:42:19.441803 pm
UUID: 9183e25d-aac3-8b47-be45-d8b6cb60f9ae
Ancestors: ReleaseBuilder-mt.200

Small fix when checking for dirty packages. Unloads package "Autogenerated" when cleaning up. Two new convenience functions to clean up the current image.

Still no auto-skipping of bad MC ancestries...

=============== Diff against ReleaseBuilder-mt.200 ===============

Item was changed:
  ----- Method: ReleaseBuilder class>>checkForDirtyPackages (in category 'scripts - support') -----
  checkForDirtyPackages
  
  	| modifiedWorkingCopies unmergedWorkingCopies |
  	MCWorkingCopy checkModified: true.
  	modifiedWorkingCopies := MCWorkingCopy allManagers
  		select: [:wc | wc ancestors size = 1 and: [wc modified] ].
  	unmergedWorkingCopies := MCWorkingCopy allManagers
  		select: [:wc | (wc ancestors size = 1) not ].
  
  	unmergedWorkingCopies ifNotEmpty: [
  		"Sort to simplify exploration. MC browser does also show packages sorted."
+ 		(unmergedWorkingCopies sorted: [:wc1 :wc2 | wc1 packageName <= wc2 packageName]) explore.
- 		(modifiedWorkingCopies sorted: [:wc1 :wc2 | wc1 packageName <= wc2 packageName]) explore.
  		Warning signal: 'There are unmerged packages.'].
  
  	modifiedWorkingCopies ifNotEmpty: [
  		"Sort to simplify exploration. MC browser does also show packages sorted."
  		(modifiedWorkingCopies sorted: [:wc1 :wc2 | wc1 packageName <= wc2 packageName]) explore.
  		
  		(self
  			confirm: 'Do you want to discard all local changes?'
  			orCancel: [^ Error signal: 'Release building canceled.']
  			title: 'Dirty Packages Found')
  				ifTrue: [modifiedWorkingCopies do: [:wc |
  					[(self buildRepository versionWithInfo: wc ancestors first) load]
  						on: Warning do: [:warning | warning resume]]]].!

Item was changed:
  ----- Method: ReleaseBuilder class>>clearCaches (in category 'scripts') -----
  clearCaches
  	"Clear caches, discard unused references, free space."
  
  	self cleanUpBitstreamVeraSans.
  	StrikeFont initialize.
  
  	Smalltalk cleanUp: true.
  	
+ 	self discardUserObjects.
- 	self discardUserObjects.	
  	MCFileBasedRepository flushAllCaches.
  
  	Environment allInstancesDo: [ : env | env purgeUndeclared ].
  	Undeclared removeUnreferencedKeys.
  	
  	Smalltalk garbageCollect.!

Item was changed:
  ----- Method: ReleaseBuilder class>>discardUserObjects (in category 'scripts - support') -----
  discardUserObjects
  
  	"Remove the classes."
  	Player removeUninstantiatedSubclassesSilently.
  	MorphicModel removeUninstantiatedSubclassesSilently.
  
  	"Clean-up environment hick-ups."
  	Environment default allClassesDo: [:cls |
  		(cls isUniClass and: [cls environment ~~ Environment default])
  			ifTrue: [Environment default forgetClass: cls logged: false]].
  	Environment default declarations
  		select: [:binding | (binding value isBehavior and: [binding value isUniClass]) and: [binding value isObsolete]]
  		thenDo: [:binding |
  			SystemOrganization removeElement: binding key.
  			Environment default removeKey: binding key].		
  
+ 	"Remove auto-generated accessors. See Preferences."
+ 	(MCPackage named: 'Autogenerated') unload.
+ 
+ 	"Remove empty categories for user objects. See Object class >> #categoryForUniclasses."
- 	"Remove empty categories for user objects."
  	SystemOrganizer cleanUp: true.!

Item was added:
+ ----- Method: ReleaseBuilder class>>saveAsNewClean (in category 'saving') -----
+ saveAsNewClean
+ 	"Use this to create clean up the current image and save it under a new name."
+ 
+ 	| fileName |
+ 	(Project uiManager
+ 		confirm: 'This will update and clean-up the current image,\which is then saved under a new name.\\Do you want to continue?' withCRs
+ 		title: 'Prepare Clean Image') == true ifFalse: [^ self].
+ 
+ 	"Prepare first so that we can propose an appropriate file name."
+ 	self
+ 		prepareSourceCode;
+ 		prepareEnvironment.
+ 
+ 	fileName := ('{1}-{2}-{3}-{4}bit-i{5}.image' format: {
+ 		SystemVersion current version.
+ 		SystemVersion current highestUpdate.
+ 		CompiledCode preferredBytecodeSetEncoderClass name allButFirst: 'EncoderFor' size.
+ 		Smalltalk wordSize * 8.
+ 		Smalltalk imageFormatVersion}).
+ 	
+ 	fileName := Project uiManager
+ 		saveFilenameRequest: 'Save clean image as...' translated
+ 		initialAnswer: fileName.
+ 	fileName ifNil: [^ self].
+ 	
+ 	Smalltalk saveAs: fileName.
+ 	self saveAndQuit.!

Item was added:
+ ----- Method: ReleaseBuilder class>>saveClean (in category 'saving') -----
+ saveClean
+ 	"Use this to create clean up the current image and save it under a new name."
+ 
+ 	(Project uiManager
+ 		confirm: 'This will update and clean-up the current (!!) image,\which is then saved under the same (!!) name.\\Do you want to continue?' withCRs
+ 		title: 'Clean Image') == true ifFalse: [^ self].
+ 
+ 	self
+ 		prepareSourceCode;
+ 		prepareEnvironment.
+ 		
+ 	self saveAndQuit.!



More information about the Squeak-dev mailing list