dermesser / integer-encoding-rs

Integer encoding for primitive integer types: Supports varint/varint+zigzag and fixed-length integer encoding and decoding, and provides synchronous and asynchronous Write/Read types for easily writing/reading integers.
Other
66 stars 16 forks source link

decode_var return value changed in 1.2.0 #11

Closed thomaskrause closed 4 years ago

thomaskrause commented 4 years ago

The return value of decode_var changed from 1.1.x to 1.2.x by returning an optional value:

https://docs.rs/integer-encoding/1.1.5/integer_encoding/trait.VarInt.html#tymethod.decode_var https://docs.rs/integer-encoding/1.2.0/integer_encoding/trait.VarInt.html#tymethod.decode_var

This leads to compilation failures in dependent crates that use this function and define

integer-encoding = "1.0"

in their Cargo.toml since cargo assumes semantic versioning and upgrades to version 1.2.1 when compiling. This hits e.g. the sstable project, that won't compile after doing a cargo update or doing a fresh checkout. My proposal would be to release the current version as 2.0.0 and yank both 1.2.0 and 1.2.1 so cargo does not consider these versions anymore.

dermesser commented 4 years ago

oh, this originates in my lack of understanding of semver, apparently. I was under the impression that 1.2.0 would be a semantically different release, allowing for API changes.

I will do as you suggested.

thomaskrause commented 4 years ago

Thanks a lot!