Skip to content

v1.0.0-rc.6

Compare
Choose a tag to compare
@zslayton zslayton released this 06 Jun 17:18
· 70 commits to main since this release
cdbc815

This release does not contain API changes, only bugfixes.

Bugfixes

Detecting incomplete values in streaming text

In binary encodings, stream items contain enough data for the reader to tell whether they are complete. In text encodings, it's possible for the buffer to end with data that looks like a complete item but is not. The only way to be certain is to try to read again from the input source to confirm there's no more data. Consider the following examples in which Ion is being pulled from a File into a Vec<u8>:

foo /* comment */   ::bar::baz::1000
└────────┬───────┘ └────────┬───────┘
  buffer contents   remaining in File

              $ion _1_0
└────────┬───────┘ └────────┬───────┘
  buffer contents   remaining in File

               75 1.20
└───────┬───────┘ └────────┬───────┘
  buffer contents   remaining in File

To avoid misinterpreting the data, the StreamingRawReader now performs a final check for text readers who have emptied their buffer: it does not consider the item complete unless the input source is exhausted. (See #784.)

Correct indentation for annotated, nested values.

Prior to PR #784, the new 'pretty' text writer implementation would indent values properly but not their annotations, resulting in unexpected output like the following:
[
foo::bar::    1,
baz::quux::    2,
quuz::    3
]

This has been corrected, and the writer now emits:

[
    foo::bar::1,
    baz::quux::2,
    quuz::3
]

PRs

  • Enables the StreamingRawReader to detect incomplete text by @zslayton in #784
  • Version bump to 1.0.0-rc.6, improvements to IonEncoding by @zslayton in #785

Full Changelog: v1.0.0-rc.5...v1.0.0-rc.6