Fuel
                                
                                
                                
                                    Fuel copied to clipboard
                            
                            
                            
                        Fix WideString serialization
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
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'
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.
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.
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.
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.