On Wed, 30 Nov 2011, David T. Lewis wrote:
On Wed, Nov 30, 2011 at 03:17:52AM -0300, Martin Dias wrote:
Hello
On Tue, Nov 29, 2011 at 7:41 PM, Juan Vuletich juan@jvuletich.org wrote:
Hi Mariano,
Mariano Martinez Peck wrote:
Hi. I am not sure if I understand which is the bug and it is difficult to do a clear diff. You mean that weak references should NOT be serialized ?
The test below documents the correct behavior. See implementors and senders of #nextPutWeak: in Cuis. Those methods have _very_ good comments. If you only dump a model, any views should not get dumped. If you dump a view, both view and model must be dumped. Basic View / Model separation: the View knows the Model, the Model doesn't know about the View. In the case of Morph, the owner of a morph dumped by itself should not be included; but the owner / submorphs relationship must be correct for all morphs that ultimately get dumped. The subtler bug in Cuis was in #references, and is also caught by this test.
Thnaks, now I understand Levente's answer. I figure out how to implement it on Fuel, it should be easy.
Thanks all,
Given apparent agreement that this is the correct approach, and considering this as a bug fix (not new feature) for ReferenceStream, I have moved Juan's changes to trunk.
After these changes we have five new errors when running all tests:
BitmapStreamTests>>#testMatrixTransform2x3WithImageSegment BitmapStreamTests>>#testShortIntegerArrayWithImageSegment BitmapStreamTests>>#testShortPointArrayWithImageSegment BitmapStreamTests>>#testShortRunArrayWithImageSegment BitmapStreamTests>>#testWordArrayWithImageSegment
The problem seems to be with DiskProxy's serialization, because the cause of the error is that it's not found in the structures dictionary during materialization.
Levente
Dave