Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFix unintentional breaking API change in `Serializer`/`Deserializer` #128
Conversation
While introducing selectable endianness in #103 , the new type parameter has been hidden from the public `serialize()`, `deserialize()` etc. functions, and only made available through an alternate API entry point. The same kind of encapsulation also needs to be performed for the public `Serializer` and `Deserializer` types.
|
Relevant issue: servo/ipc-channel#154 I'm not entirely sure what I'm doing here -- but this patch does seem to work for fixing the regression, as well as making the endianness selection available through the I guess I should add some test cases for this?... |
|
Don't worry about tests. This looks good to me. |
|
My question is: how did this break people? I pushed a new version to crates.io immediately after merging the |
|
I've published alpha-5 |
|
Cargo will silently upgrade 1.0.0-alpha2 to 1.0.0-alpha3. I would not consider this a breaking change in Bincode. Cargo should be smarter (rust-lang/cargo#2222) and ipc-channel should have used "=1.0.0-apha2". |
Wtf. I could have sworn that "alpha" releases were always precise |
dlrobertson
commented
Mar 2, 2017
|
Why was |
dlrobertson
commented
Mar 2, 2017
|
Not super important... Just wondered |
|
@dtolnay well, it clearly was a breaking change in The discussion in rust-lang/cargo#2222 , and in particular rust-lang/cargo#2222 (comment) , suggests that going from |
|
@danlrobertson from a management point of view, the answer is simply that I followed what the original PR introducing the problem did in other places... From a technical point of view, it is quite debatable whether For (And in any case, this is an orthogonal concern from the purpose of my PR; so probably should be discussed in a separate issue :-) ) |
|
@danlrobertson
I use bincode for game networking and save-file writing. I think that the default should be the "safer" option. |
dlrobertson
commented
Mar 2, 2017
|
Makes sense... My thinking was too tightly coupled with ipc-channel. Didn't think about communication accros the wire |
antrik commentedMar 1, 2017
While introducing selectable endianness in
#103 , the new type parameter
has been hidden from the public
serialize(),deserialize()etc.functions, and only made available through an alternate API entry point.
The same kind of encapsulation also needs to be performed for the public
SerializerandDeserializertypes.