[squeak-dev] The Trunk: System-ct.1357.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Jun 10 19:29:53 UTC 2022


Christoph Thiede uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-ct.1357.mcz

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

Name: System-ct.1357
Author: ct
Time: 10 June 2022, 9:29:27.189864 pm
UUID: 4a349f0b-5d33-5745-a121-949102565be5
Ancestors: System-ct.1356

Merges resetPreferences:
	Adds missing clean-ups for preferences:
	
	1. Add Preferences resetDefaultValues and send it from ReleaseBuilders after #setPreferences to bring the default values of non-pragma preferences in sync with the fresh values. See: http://lists.squeakfoundation.org/pipermail/squeak-dev/2022-January/218191.html
	2. Merge Preferences cleanUp and Preferences cleanUp: to ensure that both are executed. See SmalltalkImage>>#cleanUp:except:.
	3. Clean up project preferences during Project clean-up.
	
	Note that we have still two sources of truth for default preference values (the intrinsic #defaultValue/pragma getter and the extrinsic database ReleaseBuilder>>setPreferences). See http://lists.squeakfoundation.org/pipermail/squeak-dev/2022-January/218191.html for more information.

In the future, we might want to make sure that all preferences are covered by the database in the ReleaseBuilder.

See: https://lists.squeakfoundation.org/pipermail/squeak-dev/2022-May/220650.html

=============== Diff against System-ct.1356 ===============

Item was added:
+ ----- Method: PragmaPreference>>resetDefaultValue (in category 'initialization') -----
+ resetDefaultValue
+ 	"No-op. Pragma preferences do not have default values."!

Item was added:
+ ----- Method: Preference>>resetDefaultValue (in category 'initialization') -----
+ resetDefaultValue
+ 
+ 	self defaultValue: self preferenceValue.!

Item was removed:
- ----- Method: Preferences class>>cleanUp (in category 'class initialization') -----
- cleanUp
- 
- 	"Synchronize the cache for pragma preferences. Note that the actual preferences values are stored in class variables. So, no such value gets lost if we remove all such preferences from that cache."
- 	self removeAllPreferencesSuchThat: [:preference |
- 		preference isPragmaPreference].
- 	SystemNavigation default allSelectorsAndMethodsDo: [:behavior :selector :method |
- 		method pragmas do: [:pragma |
- 			self addPragmaPreference: pragma]].
- 	
- 	"Remove obsolete (non-pragma) preferences."
- 	self removeObsolete.
- !

Item was changed:
  ----- Method: Preferences class>>cleanUp: (in category 'initialization') -----
  cleanUp: aggressive
  
+ 	self cleanUpPragmaPreferences.
+ 	
+ 	"Remove obsolete (non-pragma) preferences."
+ 	self removeObsolete.
+ 	
  	aggressive ifTrue: [
  		self class organization categories
  			select: [:ea | ea beginsWith: '*autogenerated']
  			thenDo: [:ea | self class removeCategory: ea]].!

Item was added:
+ ----- Method: Preferences class>>cleanUpPragmaPreferences (in category 'initialization') -----
+ cleanUpPragmaPreferences
+ 	"Synchronize the cache for pragma preferences. Note that the actual preferences values are stored in class variables. So, no such value gets lost if we remove all such preferences from that cache."
+ 
+ 	self removeAllPreferencesSuchThat: [:preference |
+ 		preference isPragmaPreference].
+ 	SystemNavigation default allSelectorsAndMethodsDo: [:behavior :selector :method |
+ 		method pragmas do: [:pragma |
+ 			self addPragmaPreference: pragma]].!

Item was added:
+ ----- Method: Preferences class>>resetDefaultValues (in category 'initialization') -----
+ resetDefaultValues
+ 
+ 	self allPreferences do: [:preference |
+ 		preference resetDefaultValue].!

Item was changed:
  ----- Method: Project class>>cleanUp: (in category 'class initialization') -----
  cleanUp: agressive
  	"Remove all projects but only when cleaning aggressively"
  
  	agressive ifTrue:[
  		self removeAllButCurrent.
+ 		self current resourceManager reset].
+ 	
+ 	self cleanUpProjectPreferences.!
- 		self current resourceManager reset].!

Item was added:
+ ----- Method: Project class>>cleanUpProjectPreferences (in category 'class initialization') -----
+ cleanUpProjectPreferences
+ 
+ 	"Avoid that #initializeProjectPreferences will reuse flag dictionary from the current project."
+ 	self allSubInstancesDo: [:project |
+ 		project projectPreferenceFlagDictionary removeAll].
+ 	self allSubInstancesDo: [:project |
+ 		project initializeProjectPreferences].!



More information about the Squeak-dev mailing list