Fuel icon indicating copy to clipboard operation
Fuel copied to clipboard

Error when serilizing class with FuelMetalevel

Open GoogleCodeExporter opened this issue 10 years ago • 6 comments


needs FuelMetalevel loaded:

(ConfigurationOfFuel project version: '1.9') load: #(FuelMetalevel).


Code to reproduce:

aClass := Object subclass: #A category: 'Temporary'.
aSerializer := FLSerializer newDefault.
aSerializer analyzer considerInternalAllBehaviors: {aClass}.
aSerializer serialize: { aClass new } on: ByteArray new writeStream.




Max, you were right: It is because of FLAnalysis>>run:

    objectStack push: root.
    [ objectStack isEmpty ] 
        whileFalse: [ self mapAndTrace: objectStack pop ].
    [ privateObjectStack isEmpty ] 
        whileFalse: [ self privateMapAndTrace: privateObjectStack pop ].


reason:
classes go to the privateObjectStack, but they add objects to the objectStack, 
which is never never consumed.



a workaround is to reference the class directly from the graph. In the example:

aSerializer serialize: { aClass. aClass new } on: ByteArray new writeStream.


Original issue reported on code.google.com by [email protected] on 15 Apr 2013 at 2:11

GoogleCodeExporter avatar Mar 24 '15 16:03 GoogleCodeExporter

This issue has been automatically marked as stale because it has not had recent activity. It will remain open but will probably not come into focus. If you still think this should receive some attention, leave a comment. Thank you for your contributions.

stale[bot] avatar May 18 '21 20:05 stale[bot]

Write a test for this.

theseion avatar Oct 30 '21 17:10 theseion

This issue has been automatically marked as stale because it has not had recent activity. It will remain open but will probably not come into focus. If you still think this should receive some attention, leave a comment. Thank you for your contributions.

stale[bot] avatar Dec 29 '21 18:12 stale[bot]

Not stale.

theseion avatar Jan 02 '22 14:01 theseion

This issue has been automatically marked as stale because it has not had recent activity. It will remain open but will probably not come into focus. If you still think this should receive some attention, leave a comment. Thank you for your contributions.

stale[bot] avatar Mar 03 '22 16:03 stale[bot]

Not stale

theseion avatar Mar 04 '22 07:03 theseion