The Trunk: Monticello-bf.388.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Monticello-bf.388.mcz

commits-2
Bert Freudenberg uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-bf.388.mcz

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

Name: Monticello-bf.388
Author: bf
Time: 18 April 2010, 7:11:28.649 pm
UUID: 22c87ccc-e851-4d07-a3e8-a5413d3006b7
Ancestors: Monticello-bp.387

- bullet-proof #infoFromDictionary:cache: and re-use it in #extractInfoFrom:

=============== Diff against Monticello-bp.387 ===============

Item was changed:
  ----- Method: MCMczReader>>extractInfoFrom: (in category 'as yet unclassified') -----
  extractInfoFrom: dict
+ ^MCWorkingCopy infoFromDictionary: dict cache: self infoCache!
- ^ self infoCache at: (dict at: #id) ifAbsentPut:
- [MCVersionInfo
- name: (dict at: #name ifAbsent: [''])
- id: (UUID fromString: (dict at: #id))
- message: (dict at: #message ifAbsent: [''])
- date: ([Date fromString: (dict at: #date) ] on: Error do: [ :ex | ex return: nil ])
- time: ([ Time fromString:(dict at: #time)] on: Error do: [ :ex | ex return: nil ])
- author: (dict at: #author ifAbsent: [''])
- ancestors: ((dict at: #ancestors) collect: [:ea | self extractInfoFrom: ea])
- stepChildren: ((dict at: #stepChildren ifAbsent: [#()]) collect: [:ea | self extractInfoFrom: ea])]!

Item was changed:
  ----- Method: MCWorkingCopy class>>infoFromDictionary:cache: (in category 'as yet unclassified') -----
  infoFromDictionary: aDictionary cache: cache
  | id |
  id := aDictionary at: #id.
  ^ cache at: id ifAbsentPut:
  [MCVersionInfo
+ name: (aDictionary at: #name ifAbsent: [''])
+ id: (UUID fromString: id)
+ message: (aDictionary at: #message ifAbsent: [''])
+ date: ([Date fromString: (aDictionary at: #date)] ifError: [nil])
+ time: ([Time fromString: (aDictionary at: #time)] ifError: [nil])
+ author: (aDictionary at: #author ifAbsent: [''])
+ ancestors: (self ancestorsFromArray: (aDictionary at: #ancestors ifAbsent: []) cache: cache)
+ stepChildren: (self ancestorsFromArray: (aDictionary at: #stepChildren ifAbsent: []) cache: cache)]!
- name: (aDictionary at: #name)
- id: (aDictionary at: #id)
- message: (aDictionary at: #message)
- date: (aDictionary at: #date)
- time: (aDictionary at: #time)
- author: (aDictionary at: #author)
- ancestors: (self ancestorsFromArray: (aDictionary at: #ancestors) cache: cache)]!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-bf.388.mcz

Levente Uzonyi-2


On Sun, 18 Apr 2010, [hidden email] wrote:

> Bert Freudenberg uploaded a new version of Monticello to project The Trunk:
> http://source.squeak.org/trunk/Monticello-bf.388.mcz
>
> ==================== Summary ====================
>
> Name: Monticello-bf.388
> Author: bf
> Time: 18 April 2010, 7:11:28.649 pm
> UUID: 22c87ccc-e851-4d07-a3e8-a5413d3006b7
> Ancestors: Monticello-bp.387
>
> - bullet-proof #infoFromDictionary:cache: and re-use it in #extractInfoFrom:

There's a new bug here. MCInitializationTest >> #testWorkingCopy raises an
error, because (aDictionary at: #id) returns an UUID instead of a String
and UUID class >> #fromString: is not happy about it.
Removing the #fromString: send results in 2 errors and a failure.

Probably an #isString check is enough, but it would be better to unify the
senders.


Levente

>
> =============== Diff against Monticello-bp.387 ===============
>
> Item was changed:
>  ----- Method: MCMczReader>>extractInfoFrom: (in category 'as yet unclassified') -----
>  extractInfoFrom: dict
> + ^MCWorkingCopy infoFromDictionary: dict cache: self infoCache!
> - ^ self infoCache at: (dict at: #id) ifAbsentPut:
> - [MCVersionInfo
> - name: (dict at: #name ifAbsent: [''])
> - id: (UUID fromString: (dict at: #id))
> - message: (dict at: #message ifAbsent: [''])
> - date: ([Date fromString: (dict at: #date) ] on: Error do: [ :ex | ex return: nil ])
> - time: ([ Time fromString:(dict at: #time)] on: Error do: [ :ex | ex return: nil ])
> - author: (dict at: #author ifAbsent: [''])
> - ancestors: ((dict at: #ancestors) collect: [:ea | self extractInfoFrom: ea])
> - stepChildren: ((dict at: #stepChildren ifAbsent: [#()]) collect: [:ea | self extractInfoFrom: ea])]!
>
> Item was changed:
>  ----- Method: MCWorkingCopy class>>infoFromDictionary:cache: (in category 'as yet unclassified') -----
>  infoFromDictionary: aDictionary cache: cache
>   | id |
>   id := aDictionary at: #id.
>   ^ cache at: id ifAbsentPut:
>   [MCVersionInfo
> + name: (aDictionary at: #name ifAbsent: [''])
> + id: (UUID fromString: id)
> + message: (aDictionary at: #message ifAbsent: [''])
> + date: ([Date fromString: (aDictionary at: #date)] ifError: [nil])
> + time: ([Time fromString: (aDictionary at: #time)] ifError: [nil])
> + author: (aDictionary at: #author ifAbsent: [''])
> + ancestors: (self ancestorsFromArray: (aDictionary at: #ancestors ifAbsent: []) cache: cache)
> + stepChildren: (self ancestorsFromArray: (aDictionary at: #stepChildren ifAbsent: []) cache: cache)]!
> - name: (aDictionary at: #name)
> - id: (aDictionary at: #id)
> - message: (aDictionary at: #message)
> - date: (aDictionary at: #date)
> - time: (aDictionary at: #time)
> - author: (aDictionary at: #author)
> - ancestors: (self ancestorsFromArray: (aDictionary at: #ancestors) cache: cache)]!
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-bf.388.mcz

Bert Freudenberg
On 18.04.2010, at 22:44, Levente Uzonyi wrote:

>
>
>
> On Sun, 18 Apr 2010, [hidden email] wrote:
>
>> Bert Freudenberg uploaded a new version of Monticello to project The Trunk:
>> http://source.squeak.org/trunk/Monticello-bf.388.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Monticello-bf.388
>> Author: bf
>> Time: 18 April 2010, 7:11:28.649 pm
>> UUID: 22c87ccc-e851-4d07-a3e8-a5413d3006b7
>> Ancestors: Monticello-bp.387
>>
>> - bullet-proof #infoFromDictionary:cache: and re-use it in #extractInfoFrom:
>
> There's a new bug here. MCInitializationTest >> #testWorkingCopy raises an error, because (aDictionary at: #id) returns an UUID instead of a String and UUID class >> #fromString: is not happy about it.
> Removing the #fromString: send results in 2 errors and a failure.
>
> Probably an #isString check is enough, but it would be better to unify the senders.
>
>
> Levente


Interesting. Why is there a UUID in the dictionary? Ah, I see. Will commit a fix that ensures that the dictionary contains a String. Makes all MC tests green again :)

- Bert -

>>
>> =============== Diff against Monticello-bp.387 ===============
>>
>> Item was changed:
>> ----- Method: MCMczReader>>extractInfoFrom: (in category 'as yet unclassified') -----
>> extractInfoFrom: dict
>> + ^MCWorkingCopy infoFromDictionary: dict cache: self infoCache!
>> - ^ self infoCache at: (dict at: #id) ifAbsentPut:
>> - [MCVersionInfo
>> - name: (dict at: #name ifAbsent: [''])
>> - id: (UUID fromString: (dict at: #id))
>> - message: (dict at: #message ifAbsent: [''])
>> - date: ([Date fromString: (dict at: #date) ] on: Error do: [ :ex | ex return: nil ])
>> - time: ([ Time fromString:(dict at: #time)] on: Error do: [ :ex | ex return: nil ])
>> - author: (dict at: #author ifAbsent: [''])
>> - ancestors: ((dict at: #ancestors) collect: [:ea | self extractInfoFrom: ea])
>> - stepChildren: ((dict at: #stepChildren ifAbsent: [#()]) collect: [:ea | self extractInfoFrom: ea])]!
>>
>> Item was changed:
>> ----- Method: MCWorkingCopy class>>infoFromDictionary:cache: (in category 'as yet unclassified') -----
>> infoFromDictionary: aDictionary cache: cache
>> | id |
>> id := aDictionary at: #id.
>> ^ cache at: id ifAbsentPut:
>> [MCVersionInfo
>> + name: (aDictionary at: #name ifAbsent: [''])
>> + id: (UUID fromString: id)
>> + message: (aDictionary at: #message ifAbsent: [''])
>> + date: ([Date fromString: (aDictionary at: #date)] ifError: [nil])
>> + time: ([Time fromString: (aDictionary at: #time)] ifError: [nil])
>> + author: (aDictionary at: #author ifAbsent: [''])
>> + ancestors: (self ancestorsFromArray: (aDictionary at: #ancestors ifAbsent: []) cache: cache)
>> + stepChildren: (self ancestorsFromArray: (aDictionary at: #stepChildren ifAbsent: []) cache: cache)]!
>> - name: (aDictionary at: #name)
>> - id: (aDictionary at: #id)
>> - message: (aDictionary at: #message)
>> - date: (aDictionary at: #date)
>> - time: (aDictionary at: #time)
>> - author: (aDictionary at: #author)
>> - ancestors: (self ancestorsFromArray: (aDictionary at: #ancestors) cache: cache)]!
>>
>>
>>
>


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-bf.388.mcz

Bert Freudenberg
On 18.04.2010, at 23:30, Bert Freudenberg wrote:

>
> On 18.04.2010, at 22:44, Levente Uzonyi wrote:
>>
>>
>>
>> On Sun, 18 Apr 2010, [hidden email] wrote:
>>
>>> Bert Freudenberg uploaded a new version of Monticello to project The Trunk:
>>> http://source.squeak.org/trunk/Monticello-bf.388.mcz
>>>
>>> ==================== Summary ====================
>>>
>>> Name: Monticello-bf.388
>>> Author: bf
>>> Time: 18 April 2010, 7:11:28.649 pm
>>> UUID: 22c87ccc-e851-4d07-a3e8-a5413d3006b7
>>> Ancestors: Monticello-bp.387
>>>
>>> - bullet-proof #infoFromDictionary:cache: and re-use it in #extractInfoFrom:
>>
>> There's a new bug here. MCInitializationTest >> #testWorkingCopy raises an error, because (aDictionary at: #id) returns an UUID instead of a String and UUID class >> #fromString: is not happy about it.
>> Removing the #fromString: send results in 2 errors and a failure.
>>
>> Probably an #isString check is enough, but it would be better to unify the senders.
>>
>>
>> Levente
>
>
> Interesting. Why is there a UUID in the dictionary? Ah, I see. Will commit a fix that ensures that the dictionary contains a String. Makes all MC tests green again :)
>
> - Bert -

Even more interesting, the Monticello tests are green only the first time you run them. I tested in a clean 4.1 image - first time green, second time yellow. The first run leaves behind an MCWorkingCopy named "Monticellomocks". Later it looks for "MonticelloMocks" but can't find it because of the upper-case M ...

Moreover, the Monticello-Mocks class category is not removed after the tests, as well as the #mockClassExtension method in MCSnapshotTest's "*monticello-mocks" category. This test method actually made it into the Monticello package, so now you can't load Monticello without loading the Test first ... o_O

Also, running the MCTests modifies the "Tests" package. Not nice.

Alas, I found no quick fix.

- Bert -