[squeak-dev] The Inbox: Monticello-ct.714.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Feb 5 10:17:48 UTC 2020


Christoph Thiede uploaded a new version of Monticello to project The Inbox:
http://source.squeak.org/inbox/Monticello-ct.714.mcz

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

Name: Monticello-ct.714
Author: ct
Time: 5 February 2020, 11:17:45.064675 am
UUID: 2b7c2ae8-c1b1-bb48-aec2-f4a6d03f6507
Ancestors: Monticello-cmm.708

Improves multilingual support for loading progress notifications.

=============== Diff against Monticello-cmm.708 ===============

Item was changed:
  ----- Method: MCPackageLoader>>basicLoad (in category 'private') -----
  basicLoad
+ 	"Load the contents of some package. This is the core loading method in Monticello. Be wary about modifying it unless you understand the details and dependencies of the various entities being modified."
- 	"Load the contents of some package. This is the core loading method
- 	in Monticello. Be wary about modifying it unless you understand the details
- 	and dependencies of the various entities being modified."
  	| pkgName |
  	errorDefinitions := OrderedCollection new.
+ 	"Obviously this isn't the package name but we don't have anything else to use here.
+ 	ChangeSet current name will generally work since a CS is usually installed prior to installation."
- 	"Obviously this isn't the package name but we don't have anything else
- 	to use here. ChangeSet current name will generally work since a CS is 
- 	usually installed prior to installation."
  	pkgName := ChangeSet current name.
  	preamble ifNotNil: [ChangeSet current preambleString: (self preambleAsCommentNamed: pkgName)].
  
  RecentMessages default suspendWhile: [
  	[CurrentReadOnlySourceFiles cacheDuring: [[
+ 	"Pass 1: Load everything but the methods, which are collected in methodAdditions."
- 	"Pass 1: Load everything but the methods,  which are collected in methodAdditions."
  	additions do: [:ea | 
  		ea isMethodDefinition 
+ 			ifTrue: [methodAdditions add: ea asMethodAddition]
+ 			ifFalse: [[ea load] ifError: [errorDefinitions add: ea]].
+ 	] displayingProgress: ('Reshaping {1}' translated format: {pkgName}).
- 			ifTrue:[methodAdditions add: ea asMethodAddition]
- 			ifFalse:[[ea load]on: Error do: [errorDefinitions add: ea]].
- 	] displayingProgress: 'Reshaping ', pkgName.
  
  	"Try again any delayed definitions"
  	self shouldWarnAboutErrors ifTrue: [self warnAboutErrors].
  	errorDefinitions do: [:ea | ea load] 
+ 		displayingProgress: ('Reloading {1}' translated format: {pkgName}).
- 		displayingProgress: 'Reloading ', pkgName.
  
  	"Pass 2: We compile new / changed methods"
+ 	methodAdditions do: [:ea | ea createCompiledMethod] 
+ 		displayingProgress: ('Compiling {1}' translated format: {pkgName}).
- 	methodAdditions do:[:ea| ea createCompiledMethod] 
- 		displayingProgress: 'Compiling ', pkgName.
  
+ 	'Installing ', pkgName displayProgressFrom: 0 to: 2 during: [:bar |
+ 		"There is no progress *during* installation since a progress bar update will redraw the world and potentially call methods that we're just trying to install."
- 	'Installing ', pkgName displayProgressFrom: 0 to: 2 during:[:bar|
- 		"There is no progress *during* installation since a progress bar update
- 		will redraw the world and potentially call methods that we're just trying to install."
  		bar value: 1.
  
+ 		"Pass 3: Install the new / changed methods (this is a separate pass to allow compiler changes to be loaded)"
+ 		methodAdditions do: [:ea | ea installMethod].
- 		"Pass 3: Install the new / changed methods
- 		(this is a separate pass to allow compiler changes to be loaded)"
- 		methodAdditions do:[:ea| ea installMethod].
  
  		"Pass 4: Remove the obsolete methods"
+ 		removals do: [:ea | ea unload].
- 		removals do:[:ea| ea unload].
  	].
  
  	"Finally, notify observers for the method additions"
  	methodAdditions do: [:each | each notifyObservers] 
+ 		"the message is fake but actually telling people how much time we spend in the notifications is embarrassing so lie instead"
+ 		displayingProgress: ('Installing {1}' translated format: {pkgName}).
- 		"the message is fake but actually telling people how much time we spend
- 		in the notifications is embarrassing so lie instead"
- 		displayingProgress: 'Installing ', pkgName.
  
  	additions do: [:ea | ea postloadOver: (self obsoletionFor: ea)] 
+ 		displayingProgress: ('Initializing {1}' translated format: {pkgName}).
- 		displayingProgress: 'Initializing ', pkgName.
  
  	] on: InMidstOfFileinNotification do: [:n | n resume: true]
  	]] ensure: [self flushChangesFile]
  ]!



More information about the Squeak-dev mailing list