Skip to content

Releases: hashicorp/go-msgpack

v2.1.2 Go 1.22 support

08 Mar 18:11
1750000
Compare
Choose a tag to compare

Fix codecgen autogenerated names to use base32 for Go 1.22 support

v2.1.1

17 Oct 17:00
c1a7c12
Compare
Choose a tag to compare

Bug fix so that the msgpack encoder honors the BasicHandle.TimeNotBuiltin option (#20).

v2.1.0 time.Time decoding fix; remove unsafe, unmaintained code

09 Dec 21:55
c68e948
Compare
Choose a tag to compare

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
    of go-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 the encoding/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 the v2 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 like

    map[string]struct{A string}

    when we are deserializing into an already existing struct instance.
    This is because the struct 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 check

    We fix that by marking structs as an "immutable" type in the decoder,
    forcing it to recreate the struct rather than try to write to
    a non-addressable struct.

  • 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

27 Oct 15:02
Compare
Choose a tag to compare

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

27 Oct 15:02
Compare
Choose a tag to compare

See release notes for v2.0.0

v1.1.5

31 Mar 13:38
Compare
Choose a tag to compare

Pulling upstream ugorji/go at 08f7b40 : ugorji@08f7b40

That's what-would-have-been-v1.1.5 of upstream plus some fixes.

v0.5.5

02 May 14:55
ad60660
Compare
Choose a tag to compare

Fix an issue where struct pointer fields tagged with omitempty will be omitted if referenced value is empty, so a field of type *bool, then field would be omitted pointer is nil or &false.

v0.5.4

18 Apr 18:48
c4a1f61
Compare
Choose a tag to compare

Fixed a decoding issue when decoding a string value in a map where the value already existed would panic.