[Pharo-dev] PharoCondenseChanges validation

Sven Van Caekenberghe sven at stfx.eu
Sun Apr 13 07:53:56 EDT 2014


On 13 Apr 2014, at 13:39, Max Leske <maxleske at gmail.com> wrote:

> I’d like to help but… where is PharoCondenseChanges in the latest image?

The class is called PharoChangesCondenser

I am going to check myself

> On 13.04.2014, at 13:29, Ben Coman <btc at openInWorld.com> wrote:
> 
>> Its cool the new PharoCondenseChanges was integrated 30821, presumably to be used for Pharo 3 release.  I have a problem running it on MS Windows (reported on Case 12729), but that is not critical for the Release since presumably for that it only needs to run properly on one platform. 
>> 
>> However while investigating my MS Windows problem, it seemed that some sources before and after were not the same.  This could be an consequence of the MS Windows problem, so I was hoping that someone could report the result of the following code on non-Windows platforms (presuming that this provides a valid #condense function check.)
>> ---------
>> cacheMethodSourcesBlock :=
>> [       | classes methods methodSources |
>>         classes := (Smalltalk globals select: [  :g | g isClass ]) values.
>>         methods := classes flatCollect: [ :c | c methods ].
>>         methodSources := Dictionary new.
>>         methods do: [ :m | methodSources at: m printString put: m asString ].
>>         methodSources
>> ].
>> 
>> methodSourcesBefore := cacheMethodSourcesBlock value.
>> 
>> PharoCondenseChanges condense.  "btw, this took over an hour for me. Is that reasonable?"
>> 
>> methodSourcesAfter := cacheMethodSourcesBlock value.
>> 
>> sameAfter := Dictionary new.
>> diffAfter := Dictionary new.
>> methodSourcesBefore keys do:
>> [       :methodName |  | methodSourceBefore methodSourceAfter |
>>         methodSourceBefore := methodSourcesBefore at: methodName.
>>         methodSourceAfter := methodSourcesAfter  at: methodName.
>>         methodSourceBefore = methodSourceAfter 
>>             ifTrue: [ sameAfter at: methodName put: { #beforeAndAfter -> methodSourceBefore } ]
>>             ifFalse: [ diffAfter at: methodName put: { #before -> methodSourceBefore . String cr, String cr. #after -> methodSourceAfter }]
>> ].
>> 
>> { #sameAfter -> sameAfter size . #diffAfter -> diffAfter size } inspect
>> ---------
>> 
>> cheer -ben
> 





More information about the Pharo-dev mailing list