[Pkg] DeltaStreams: DeltaStreams-Model-gk.20.mcz

squeak-dev-noreply at lists.squeakfoundation.org squeak-dev-noreply at lists.squeakfoundation.org
Mon Sep 7 16:27:24 UTC 2009

A new version of DeltaStreams-Model was added to project DeltaStreams:

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

Name: DeltaStreams-Model-gk.20
Author: gk
Time: 7 September 2009, 6:27:02 am
UUID: 9cf8d97e-16dd-4839-a2e4-6f5d001f513d
Ancestors: DeltaStreams-Model-Igor.Stasenko.19

Removed some cruft.
Removed the grouper decoration.
Renamed clearChanges to removeAll.

=============== Diff against DeltaStreams-Model-Igor.Stasenko.19 ===============

Item was added:
+ ----- Method: DSChangeSequence>>removeAll (in category 'applying') -----
+ removeAll
+ 	"Remove all changes and return them."
+ 	| oldChanges |
+ 	oldChanges := changes.
+ 	changes := nil.
+ 	^oldChanges!

Item was changed:
  ----- Method: DSMethodChange>>fromChange: (in category 'initialize-release') -----
  fromChange: aChange
  	super fromChange: aChange.
- 	self className: aChange className.
  	self selector: aChange selector.
  	self meta: aChange meta.
  	self source: aChange source.
  	self protocol: aChange protocol.
  	self stamp: aChange stamp.	!

Item was changed:
+ ----- Method: DSDelta>>compress (in category 'changes') -----
- ----- Method: DSDelta>>compress (in category 'manipulate') -----
  	"Modify changes so that they are compacted into the minimal form
  	still producing the equivalent end result. In other words - remove redundancy.
  	Fir we move all class rename changes to the beginning, but AFTER any DoIts.
  	Then we remove all redundant shadowed changes.
  	Finally we merge those we can merge."
  	changeSequence ifNotNil: [
  		changeSequence moveClassNameChanges; removeShadows; mergeChanges]!

Item was changed:
  ----- Method: DSDelta>>remove: (in category 'changes') -----
  remove: aChange
  	| change |
+ 	change := changeSequence remove: change.
- 	change := self changes remove: change.
- 	self grouper ifNotNil: [self grouper remove: change].
  	self changed: #changeList.
  	^ change!

Item was changed:
  DSChange subclass: #DSDoIt
+ 	instanceVariableNames: 'contextWasNil kind status antiDoIt doIt'
- 	instanceVariableNames: 'expression antiExpression contextWasNil kind status antiDoIt doIt'
  	classVariableNames: ''
  	poolDictionaries: ''
  	category: 'DeltaStreams-Model-Base'!
  !DSDoIt commentStamp: 'gk 9/5/2009 15:24' prior: 0!
  A DSDoIt change is only recorded if you expressly configure the Delta to record them. While catching all doits this also creates redundant doits because for class definition changes the Delta will record both the event coming from ClassBuilder and then the doit itself too. Not sure exactly how we can prevent this in a NICE way
  Currently DoIts are handled like this:
  	- We only record them if the Delta is configured to do that, see #recordDoits:
  	- We only apply them if they are marked explicitly to be applied, see #executeOnApply:
  	- We only consider a DoIt reversable if the antiDoIt if is set to something other than nil.
  Good rules to follow:
  	1. Do not record or use DoIts. :) If you really need to have a DoIt in your Delta, put it there manually.
  	2. If you record DoIts because you do not want to miss anything , prune them out before distributing the Delta.
  	3. If you still have a DoIt in your Delta that you intend to distribute, make sure that:
  		- It can cope with missing globals/classes!!
  		- It can be safely run multiple times without problems!!
  		- You marked it to be run on apply using #executeOnApply:. This is an EXPLICIT step for a reason.
  		- If it should do able to be REVERSED you need to supply an antiDoIt.
  		- Put DoIts preferrably first or last in the Delta to avoid strange situations. Remember that even if changes are ordered they may be applied atomically by an applier.
  NOTE: A Delta containing any DoIt will be visualized as "dangerous" in the user interfaces so please avoid them unless you REALLY need them.!

Item was changed:
+ ----- Method: DSDelta>>classGroupsDo: (in category 'changes') -----
- ----- Method: DSDelta>>classGroupsDo: (in category 'manipulate') -----
  classGroupsDo: aBlock
  	"Execute a block for all groups of changes per class."
  	| groups coll |
  	groups := Dictionary new.
  	self changes do: [:each |
  		coll := groups at: each className ifAbsentPut: [SortedCollection new].
  		coll add: each].
  	groups values do: [:group | aBlock value: group]!

Item was changed:
  ----- Method: DSDelta>>add: (in category 'changes') -----
  add: aChange
+ 	changeSequence add: aChange.
- 	self changes add: aChange.
- 	self grouper ifNotNil: [self grouper add: aChange].
  	self changed: #changeList.
  	^ aChange!

Item was removed:
- ----- Method: DSChangeSequence>>clearChanges (in category 'applying') -----
- clearChanges
- 	"Remove all changes and return them."
- 	| oldChanges |
- 	oldChanges := changes.
- 	changes := nil.
- 	^oldChanges!

Item was removed:
- ----- Method: DSDoIt>>expression (in category 'accessing') -----
- expression
- 	^ expression!

Item was removed:
- ----- Method: DSDelta>>grouper (in category 'accessing') -----
- grouper
- 	^self propertyAt: #grouper!

Item was removed:
- ----- Method: DSDelta>>test (in category 'accessing') -----
- test
- 	^test!

More information about the Packages mailing list