Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump version to 0.11.0 #232

Merged
merged 1 commit into from
Jul 2, 2024
Merged

Bump version to 0.11.0 #232

merged 1 commit into from
Jul 2, 2024

Conversation

nhz2
Copy link
Member

@nhz2 nhz2 commented Jul 1, 2024

How to migrate from v0.10 to v0.11

v0.11 has a few subtle breaking changes to eof and seekend.

Memory(data::ByteData)

The Memory(data::ByteData) constructor was removed.
Use Memory(pointer(data), sizeof(data)) instead.

seekend(stream::TranscodingStream)

Generic seekend for TranscodingStream was removed.
If the objective is to discard all remaining data in the stream, use skip(stream, typemax(Int64)) instead where typemax(Int64) is meant to be a large number to exhaust the stream.
Ideally, specific implementations of TranscodingStream will implement seekend only if efficient means exist to avoid fully processing the stream.
NoopStream still supports seekend.

The previous behavior of the generic seekend was something like
(seekstart(stream); seekend(stream.stream); stream) but this led to
inconsistencies with the position of the stream.

eof(stream::TranscodingStream)

eof now throws an error if called on a stream that is closed or in writing mode.
Use !isreadable(stream) || eof(stream) if you need to more closely match previous behavior.

@nhz2
Copy link
Member Author

nhz2 commented Jul 1, 2024

I plan to do a patch bump for updating the Codec packages, because these changes mainly affect packages that directly depend on TranscodingStreams.

@nhz2 nhz2 merged commit 76543ed into master Jul 2, 2024
26 checks passed
@nhz2 nhz2 deleted the nz/bump-version-to-0.11.0 branch July 2, 2024 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants