On Fri, Jun 8, 2012 at 1:41 AM, Paul DeBruicker <[email protected]> wrote:
> On 06/07/2012 02:25 PM, Mariano Martinez Peck wrote: > >> | serializer | >> serializer := FLSerializer newFull. >> serializer serialize: xxx on: aStream. >> >> and tell me if that also work? >> > > > > After loading FuelMetaLevel as Martin suggested the above code works to > serialize and materialize the problematic domain objects just fine. > Ok, just to clarify: when you install the package Fuel only, and in your graph you have entities like classes or methods, they will be considered "global", that is, we just store the class name and selector and during materialization we search it in the Smalltalk globals. If the class/method is not present, we throw an error. Now...closures are more complicated because you can even EVALUATE them. If the method surrounding the closure has changed in the image you are materializing, evaluating the closure (depending on the change in the method) can even crash your VM. Because of that, when serializing methods "as globals" we also store a chemsum and we compare during materialization to see that it hasn't change it. If changed, we throw the FLMethodChanged. With the package FuelMetalevel, and by using #newFull the serializer will consider the method as "full" so it will be fully serialized, and therefore you don't have the problem of the checksum. Anyway, you found a bug because you should not be needing FuelMetalevel since you are serializing and materializing in the same image. We will investigate it. Thanks -- Mariano http://marianopeck.wordpress.com
