Fuel bug. Array class substitution is not working
Hi. I detect strange bug. Substitution Array class is not working. Try this: s := ByteArray new writeStream. serializer := FLSerializer newDefault. serializer analyzer when: [ :o | o==Array ] substituteBy: [ :o | #instead ]. serializer serialize: {Array} on: s . s2 := s contents readStream. object := (FLMaterializer newDefault materializeFrom: s2) root. Interesting that other classes are working correctly. I open issue 17669 <https://pharo.fogbugz.com/f/cases/17669/Fuel-substitution-for-Array-class-is...>
And maybe it is not issue and behaviour is correct. We want to substitute class with some object but full object graph includes instance of that class. In such case Fuel will use substitution as reference to class of serializable instance. And on materialisation substitution can not understand #fuelNew: protocol. 2016-02-22 11:36 GMT+01:00 Denis Kudriashov <dionisiydk@gmail.com>:
Hi.
I detect strange bug. Substitution Array class is not working. Try this:
s := ByteArray new writeStream. serializer := FLSerializer newDefault. serializer analyzer when: [ :o | o==Array ] substituteBy: [ :o | #instead ]. serializer serialize: {Array} on: s . s2 := s contents readStream.
object := (FLMaterializer newDefault materializeFrom: s2) root.
Interesting that other classes are working correctly. I open issue 17669 <https://pharo.fogbugz.com/f/cases/17669/Fuel-substitution-for-Array-class-is...>
No, this is definitely not intended to fail. Weâll take a look.
On 22 Feb 2016, at 13:07, Denis Kudriashov <dionisiydk@gmail.com> wrote:
And maybe it is not issue and behaviour is correct.
We want to substitute class with some object but full object graph includes instance of that class. In such case Fuel will use substitution as reference to class of serializable instance. And on materialisation substitution can not understand #fuelNew: protocol.
2016-02-22 11:36 GMT+01:00 Denis Kudriashov <dionisiydk@gmail.com <mailto:dionisiydk@gmail.com>>: Hi.
I detect strange bug. Substitution Array class is not working. Try this:
s := ByteArray new writeStream. serializer := FLSerializer newDefault. serializer analyzer when: [ :o | o==Array ] substituteBy: [ :o | #instead ]. serializer serialize: {Array} on: s . s2 := s contents readStream.
object := (FLMaterializer newDefault materializeFrom: s2) root.
Interesting that other classes are working correctly. I open issue 17669 <https://pharo.fogbugz.com/f/cases/17669/Fuel-substitution-for-Array-class-is...>
participants (2)
-
Denis Kudriashov -
Max Leske