-
-
Notifications
You must be signed in to change notification settings - Fork 282
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
Incompatibility with static serialization formats #466
Comments
Ah, I didn't realize this. I'll get a patch put together tonight, most likely. |
Hmm. There's an interesting problem here. I guarantee the following:
(from the 0.3.6 release notes) I don't see how this could be implemented for a generic deserializer while upholding this guarantee, as the Edit: Trying to write a test that actually demonstrates the incorrect behavior doesn't appear possible with |
I believe the current behaviour can be tied to the Additionally there could be a |
The current behavior has a fallback. If |
I'm talking about the case when |
Sure, but that's not the issue. When it is enabled, the current behavior should not break. That is my concern that I don't see a way around. |
I see, well, making it work without the feature enabled would satisfy my use-case at least, I suspect most people who serialize to binary formats wouldn't bother with that feature anyway. I don't see a way to fall back either for all cases, even untagged serde enums seem to use |
True. I could conditionally call the method directly, but it doesn't solve the issue entirely. I'll do that later. |
Should be all set on main! |
Fixes the same issue as in time-rs#466
Currently it is not possible to deserialize most
time
items using formats that require the layout to be known, such asbincode
orpostcard
due to the call todeserialize_any
.The fix should be rather straightforward by calling
deserialize_tuple
instead if theserde-human-readable
feature is not enabled. I can follow up with a PR if this change is desirable.The text was updated successfully, but these errors were encountered: