Closed hatf0 closed 2 years ago
In the MessagePack deserializer, this test fails:
/// Test map with varying key lengths @safe pure version(mir_ion_msgpack_test) unittest { import mir.ion.ser.msgpack : serializeMsgpack; import std.array : replicate; ubyte[string] map; map["c".replicate(ushort.max + 1)] = 0xFF; assert(serializeMsgpack(map).deserializeMsgpack!(typeof(map)) == map); }
I've narrowed this down to this specific line where we grow the key-space. https://github.com/libmir/mir-ion/blob/b3efeecde5292113c33bb8c701edec2bc61af7ca/source/mir/ion/symbol_table.d#L362 I believe that this if should actually be a while, otherwise we give up on growing the key-space way too early.
if
while
In the MessagePack deserializer, this test fails:
I've narrowed this down to this specific line where we grow the key-space. https://github.com/libmir/mir-ion/blob/b3efeecde5292113c33bb8c701edec2bc61af7ca/source/mir/ion/symbol_table.d#L362 I believe that this
if
should actually be awhile
, otherwise we give up on growing the key-space way too early.