-
Notifications
You must be signed in to change notification settings - Fork 47
fix: Don't depend on Serde to provide fields in the right order #351
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
Conversation
|
Please fix the formatting issue. |
|
Fixed, CI will still fail as the test does fail and we need to decide what the right course of action is. |
I won't have time to debug it in the next days but I was going to bet that we probably don't use the avro-rs/avro/src/ser_schema.rs Lines 298 to 299 in 335e74e
So, it must be something else. |
|
The lookup is only used to find the field information from the name. |
|
I've added support for out-of-order fields in the serializer. In the deserializer no changed are necessary. |
|
I've downgraded it to a debug_assert and added an extra check in |
I've also added a check that should prevent the debug_assert from ever happening.
|
The |
This is a (failing) test for when the field order differs between the struct (Serde) and the schema:
There are two options:
ser_schema.rs(and potentiallyde.rs) to care about the field order