v0.17.0
go-ipld-prime's release policy says that:
even numbers should be easy upgrades; odd numbers may change things
In that spirit, this v0.17.0 release includes some potentially breaking changes. Although minor, they are marked below and they may lead to behavioral changes in your use of this library.
🛠 Breaking Changes
- Codecs:
- DAG-CBOR, DAG-JSON: Error on
cid.Undef
links in dag{json,cbor} encoding - previously, encoding Link nodes that were empty CIDs (uninitialized zero-value or explicitlycid.Undef
) would have passed through the DAG-CBOR or DAG-JSON codecs, silently producing erroneous output that wouldn't successfully pass back through a decode. (Rod Vagg)
- DAG-CBOR, DAG-JSON: Error on
- Bindnode:
- Panic early if API has been passed ptr-to-ptr - previous usage of bindnode using pointers-to-pointers may have deferred (or in some cases avoided) panics until deeper usage of the API, this change makes it earlier to make it clear that pointer-to-pointer is not appropriate usage. (Rod Vagg)
- Build:
- Drop Go 1.16.x testing & begin testing Go 1.18.x (Daniel Martí)
- Note also that in this release, the github.com/ipfs/go-cid dependency is upgraded from 0.0.4 to 0.2.0 which includes a breaking change with the removal of the
cid.Codecs
andcid.CodecToStr
maps which may disruptive. See the [email protected] release page for details.
🔦 Highlights
- Data Model:
- Bindnode:
- Fuzzing and hardening for production use (Daniel Martí)
- Refuse to decode empty union values (Daniel Martí)
- Allow nilable types for IPLD
optional
/nullable
(Daniel Martí) - More helpful error message for common enum value footgun (Rod Vagg)
- Infer links and
Any
from Go types (Rod Vagg)
- Schemas:
- DMT: Proper checking for unknown union members (Daniel Martí)
- DMT: Enum representations must be valid members (Daniel Martí)
- DMT: Reject duplicate or missing union representation members (Daniel Martí)
- DSL: Support
stringjoin
struct representation andstringprefix
union representation (Eric Evenchick) - DMT, DSL: Enable inline types (Rod Vagg)
- Patch:
- Add initial version of IPLD Patch feature (Eric Myhre) (helped across the line by mauve and Rod Vagg)
- Codecs:
- DAG-CBOR: Reject extraneous content after valid (complete) CBOR object (Rod Vagg)
- DAG-CBOR: add
DecodeOptions.ExperimentalDeterminism
(currently only checking map sorting order) (Daniel Martí) - Printer: Fix printing of floats (Dustin Long)
- DAG-JSON: Add option to not parse beyond end of structure (Petar Maymounkov)
- Build:
- Fix macOS and Windows testing (Rod Vagg)
- Fix 32-bit build support (Rod Vagg)
- Make staticcheck and govet happy across codebase (Rod Vagg)
- Enable full unified-ci GitHub Actions suite, including auto-updating (Rod Vagg)
- Enable dependabot, with monthly checks (and update all dependencies) (Rod Vagg)
Special thanks to Daniel Martí for many bindnode improvements and hardening, fuzzing across the library and improvements to the Schema DMT and DSL.