Fuel icon indicating copy to clipboard operation
Fuel copied to clipboard

Fix WideString serialization

Open GoogleCodeExporter opened this issue 10 years ago • 5 comments

See senders of #encodeString:
There are a lot of cases where a WideString can be passed as argument: inst 
vars, class names, global names.

Original issue reported on code.google.com by [email protected] on 25 Feb 2013 at 4:12

GoogleCodeExporter avatar Mar 24 '15 16:03 GoogleCodeExporter

Steps to reproduce:

cl := Class new setName: 'Foo' asWideString; yourself.
Smalltalk at: cl name put: cl.
FLSerializer serializeToByteArray: (Smalltalk at: cl name)

It produces a 'Improper store into indexable object'

dalsat avatar Mar 31 '15 14:03 dalsat

Added tests that reproduce the issue. A fix is not going to be straight forward because global names are encoded as strings and are written onto the stream directly.

theseion avatar Mar 31 '15 14:03 theseion

Yes, this is a known limitation we have since forever. At the time we were thinking about it, we found out that Pharo tools were not even supporting class names with widestring...so it was not even worth to adapt fuel for that. In all Pharo tools now (browser, monticello, class creation, etc etc) seem to work correct with WideStrings class names, then this issue would make sense to fix.

marianopeck avatar Mar 31 '15 15:03 marianopeck

During investigation of this issue we discovered that a global binding can be anything since SystemDictionary is a simply key value store. That means that we can't even be sure that we get a String as the class name (we managed to create a class with name 4 [a SmallInteger]).

I'll write a mail to the list shortly to see what the view is on this topic.

theseion avatar Mar 31 '15 15:03 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 May 18 '21 20:05 stale[bot]