You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
Recently, it was noticed that the ProtoBuf.jl package v1.0+ doesn't encode map fields the way the spec requires (see JuliaIO/ProtoBuf.jl#233), meaning that our map fields would serialize and deserialize fine in ProtoBuf.jl v1.0+, but not with other ProtoBuf implementations. Specifically, we weren't treating the map as an array of messages, each containing two fields, but as a "packed" array of interleaved keys and values.
This is a bug and we are close to fixing it here: JuliaIO/ProtoBuf.jl#234. We'll release the fix as a new patch version, hopefully later this week. This might break compatibility with older files your package has produced since you are using map fields.
If you have some older files that are not easy to re-create and you'd like to convert to the new encoding here is a possible way to achieve that:
a) Decode the file using a compatible ProtoBuf.jl package version
b) write the struct to disk using Serialization.jl (or other appropriate format)
then, in a new session
c) read the struct from disk using Serialization.jl
d) Encode struct to disk using the new ProtoBuf.jl package with fixed map encoding
I'm very sorry for this inconvenience.
The text was updated successfully, but these errors were encountered:
Hello,
Recently, it was noticed that the ProtoBuf.jl package v1.0+ doesn't encode
map
fields the way the spec requires (see JuliaIO/ProtoBuf.jl#233), meaning that ourmap
fields would serialize and deserialize fine in ProtoBuf.jl v1.0+, but not with other ProtoBuf implementations. Specifically, we weren't treating themap
as an array of messages, each containing two fields, but as a "packed" array of interleaved keys and values.This is a bug and we are close to fixing it here: JuliaIO/ProtoBuf.jl#234. We'll release the fix as a new patch version, hopefully later this week. This might break compatibility with older files your package has produced since you are using
map
fields.If you have some older files that are not easy to re-create and you'd like to convert to the new encoding here is a possible way to achieve that:
a) Decode the file using a compatible ProtoBuf.jl package version
b) write the struct to disk using Serialization.jl (or other appropriate format)
then, in a new session
c) read the struct from disk using Serialization.jl
d) Encode struct to disk using the new ProtoBuf.jl package with fixed
map
encodingI'm very sorry for this inconvenience.
The text was updated successfully, but these errors were encountered: