bincode-org / bincode

A binary encoder / decoder implementation in Rust.
MIT License
2.69k stars 272 forks source link

Backward Non-compabile changes between 2.0.0-beta.3 and 2.0.0-rc3 #724

Closed haochenuw closed 4 weeks ago

haochenuw commented 1 month ago

It seems between these releases the following

pub struct WriteFixedArrayLength {}

was removed. This is a breaking change since clients could be using the struct in their code. Could this be fixed?

VictorKoenders commented 4 weeks ago

Relevant PR: https://github.com/bincode-org/bincode/pull/625 The entire array implementation was not compatible with bincode 1, so we ripped it out and fixed that issue.

That PR ends with:

They may be re-added in the future.

So I think this option is still open

VictorKoenders commented 4 weeks ago

One question I have is why you would want to care if bincode writes array lengths or not. What is your use case?

haochenuw commented 4 weeks ago

I am not a direct user so cannot comment on that. If the user shouldn't care, why was this struct exposed to the public?

On Thu, Oct 3, 2024 at 9:40 PM Trangar @.***> wrote:

One question I have is why you would want to care if bincode writes array lengths or not. What is your use case?

— Reply to this email directly, view it on GitHub https://github.com/bincode-org/bincode/issues/724#issuecomment-2392808746, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7YZSCVFCAQM3E6FHVXMUDZZYL4XAVCNFSM6AAAAABPKD6Q3SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJSHAYDQNZUGY . You are receiving this because you authored the thread.Message ID: @.***>

VictorKoenders commented 4 weeks ago

If the user shouldn't care, why was this struct exposed to the public?

That's why we removed it 😄

ZoeyR commented 4 weeks ago

Backwards compatibility is not something we guarantee before the final stable release of 2.0. If absolute stability is necessary the 1.0 branch should be used instead.