Releases: hashicorp/go-msgpack
v2.1.2 Go 1.22 support
v2.1.1
v2.1.0 time.Time decoding fix; remove unsafe, unmaintained code
This release is primarily a cleanup release and to reduce the surface are of this library to just the safe variants of the msgpack and JSON codecs, and remove as much else as possible.
Included changes:
-
GH-13 Make time.Time decoding backwards compatible, and add full binary raft tests
We are concerned with binary backwards compatibility for this
project, especially as the upstream has a history of making breaking
changes.With that in mind, I collected a bunch of data from
https://github.com/hashicorp/raft for v0.5.5, v1.1.5, and v1.1.6
ofgo-msgpack
to ensure that, moving forward, we can always decode
old raft logs.For the tests to pass, we have to support decoding
time.Time
using theencoding/binary
marshalling format, which was used
in certain v1.1.6.If users want to encode into the old binary marshalling time.Time format, it is still available with the
codec.BasicHandle.TimeNotBuiltin
option. Setting this option could help with migrating to thev2
versions. -
GH-14 Remove fastpath and unsafe variants
-
GH-15 Use GitHub Actions instead of CircleCI
-
GH-16 Fix safe regression for non-addressable structs
When we removed the default, unsafe mode, it caused a regression
where we are no longer able to deserialize things likemap[string]struct{A string}
when we are deserializing into an already existing
struct
instance.
This is because thestruct
in the map is not addressable by default,
which caused a runtime panic. The previous unsafe version wrote
directly to the underlying memory and bypassed this checkWe fix that by marking structs as an "immutable" type in the decoder,
forcing it to recreate thestruct
rather than try to write to
a non-addressablestruct
. -
GH-17: Fix benchmarks; delete cbor, simple, binc (#17)
- Fixed all of the benchmark code to work again.
- Updated documentation with correct package paths
- Deleted protocols we don't need
cbor- simple
- binc
- Removed a bunch of workarounds for old Go versions
- Removed some redundant documentation
v2.0.0
This tag is a replacement for github.com/hashicorp/[email protected]
, which merged incompatible changes from upstream ugorji/go
.
Moving forwards, all dependencies requiring compatibility with v1.1.5
should rely on v2.x.x
.
Retract v1.1.5
See release notes for v2.0.0