STON: SortedCollection Bug?

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

STON: SortedCollection Bug?

Sean P. DeNigris
Administrator
I serialized aSortedCollection with a sort block comparing via a #startTime
message on the domain objects. When I attempted to materialize it, I got an
error that my domain objects don't understand #<=. It seems that the
elements are being loaded before the sort block.



-----
Cheers,
Sean
--
Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html

Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: STON: SortedCollection Bug?

Sven Van Caekenberghe-2
STON cannot serialise block closures. You would have to get creative to make this work.

For SortedCollection, it would only work without a sort block.

  STON fromString: (STON toString: #(1 2 3) asSortedCollection).

> On 9 Sep 2017, at 04:58, Sean P. DeNigris <[hidden email]> wrote:
>
> I serialized aSortedCollection with a sort block comparing via a #startTime
> message on the domain objects. When I attempted to materialize it, I got an
> error that my domain objects don't understand #<=. It seems that the
> elements are being loaded before the sort block.
>
>
>
> -----
> Cheers,
> Sean
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html
>


Reply | Threaded
Open this post in threaded view
|

Re: STON: SortedCollection Bug?

Sean P. DeNigris
Administrator
Sven Van Caekenberghe-2 wrote
> STON cannot serialise block closures.

Oops, sorry. I see that now:
https://github.com/svenvc/ston/blob/master/ston-paper.md#limitations

I wonder, in this case, there are no references in the block to any objects
except its own arguments. Would it be possible to support that limited case?
(I don't need it for myself, just pondering out loud)



-----
Cheers,
Sean
--
Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html

Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: STON: SortedCollection Bug?

Sven Van Caekenberghe-2

> On 9 Sep 2017, at 15:45, Sean P. DeNigris <[hidden email]> wrote:
>
> Sven Van Caekenberghe-2 wrote
>> STON cannot serialise block closures.
>
> Oops, sorry. I see that now:
> https://github.com/svenvc/ston/blob/master/ston-paper.md#limitations
>
> I wonder, in this case, there are no references in the block to any objects
> except its own arguments. Would it be possible to support that limited case?
> (I don't need it for myself, just pondering out loud)

Yeah, I was thinking along the same lines, especially clean block might be doable.

I'll mark this as todo and think about it a bit.