Skip to content

v0.16.0

Compare
Choose a tag to compare
@warpfork warpfork released this 09 Mar 01:40
· 248 commits to master since this release

This release is a smooth-sailing release. (The even number represents the intention of even-keel smooth sailing.) It's mostly improvements to features that are already familiar, and a few new features. (Some of which are really neat!)

There haven't been any major API departures or changes in quite a while now. This should be an easy upgrade to make. And you probably want it! Especially, if you use the bindnode system, the quality of life has gone up drastically in the last few points releases, and jumps again in this release too.

See the complete list and further details below:

  • New: traversal.WalkTransforming is finally implemented! (It's been a stub for quite a while.) This works similarly to the other transform features, but can do more than change to the structure during a single walk.
  • New: Selectors support partial/ranged match on bytes or strings nodes. (This is also a new feature for Selectors, recently specified.)
    [#375; seealso specs in ipld#184]
  • New: there's a datamodel.LargeBytesNode interface, which makes it possible to handle "large" blobs of bytes as a Node, without necessarily forcing them all into memory at once. (This is optional; you add the methods to match the interface if your Node implementation supports the feature.)
    [#372]
    • Slightly more specifically: this interface is Node plus a method that returns an io.ReadSeeker. (Pretty standard golang I/O and byte slice management concepts should carry you from there in the usual ways.)
    • This is a really big deal -- for example, this means that an ADL can support reading of arbitrarily large bytes without an issue. (Hello, transparently readable large sharded blobs!)
  • New: there's a "resume" (or, skipahead) mechanism for traversals and selectors. Engage it by simply setting the traversal.Config.StartAtPath field.
    [#358]
  • New: dagcbor now has a EncodedLength(Node) int function, which can calculate the expected serial message length without actually encoding. (The usefulness of this may be situational, but it's there if you want it.)
  • Improved: bindnode, yet again, in more ways that can easily be summarized.
    • Better support for pointers in more places in your golang types.
    • Many panics either fixed or routed into calmer errors.
    • Unsigned intergers are now supported in your golang types.
    • Some fixes for AssignNode working correctly (e.g. at the type or representation level, as appropriate; sometimes previously it would use the type level incorrectly).
    • Various fixes to handling absent fields correctly.
    • A datamodel.Node can now be used for an any field.
  • Fixed: selectors now behave correctly for a recursion clause that just contains a recursion edge immedately. (It's still not a sensible selector, really, but it's valid.) Previously this would panic, which was nasty.
  • Fixed: bindnode now correctly doesn't include absent fields in the count of length when looking at the representation-level view of structs.
  • Improved: all our batteries-included codecs double check while encoding that the number iterator steps over a map matches its self-reported length. (This doesn't matter in many cases, but does defend you a little better against a Node implementation with a bug, if you happen to be so unlucky.)
  • Improved: miscellaneous performance work in the schema/* area.

In addition, several point releases have transpired since v0.14.0: v0.14.1, v0.14.2, v0.14.3, and v0.14.4 -- all flew by were in rapid succession. Their changes are compressed into one heap here for brevity:

  • New: Selectors can include clauses for signalling the use of ADLs!
    [#301; seealso specs in ipld#149+ipld#170]
  • Improved: bindnode, in ways more various than can easily be summarized.
    • The cidlink.Link type can be bound to links in the data.
    • Enums are now supported.
    • The any typekind is now supported.
  • Improved: both the schema/dmt and schema/dsl packages (and in some cases, the schema package itself) continue to be improved and become more complete.
    • Structs with tuple representation are now supported.
    • Enums with int representation are now supported.
    • The any typekind is now supported.
  • Changed: the dag-json codec will tolerate padded base64 in bytes content upon read. It does so silently. (It is not still possible to emit this kind of serial data with this library; it is noncanonical.)
    [#309]
  • Changed: the cbor and dag-cbor codec will now tolerate CBOR's "undef" token. It will coerce it to a null token when reading. Previously, encountering the undef token would result in a parse error. (It is still not possible to emit this token with this library.)
    [#308]
  • New: the traversal package gained a WalkLocal function. This simply does a walk that does not cross any links.

Thank you to @mvdan, @warpfork, @hannahhoward, @rvagg, @willscott, @arajasek and others
for all their work that went into making this release (as well as all the point releases in v0.14.x leading up to it) happen.

Finally, please note that we're starting to try out some new (and slightly more formal) governance and review and merge processes.
Check out #370 for more information.
The aim is to make things generally more inclusive and involve more contributors!
This is still experimental and may be subject to change, but if you'd like to have better expectations about who can review and what the process should be like, we hope this will be a step in a helpful direction.
(Feedback about this experiment welcome!)