-
Notifications
You must be signed in to change notification settings - Fork 44
feat: Use the Serde attributes and check for conflicting attributes #377
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
762c230 to
4efa998
Compare
This commit changes the attribute parsing in `#[derive(AvroSchema)]` to also use the Serde attributes. It will use the Serde attributes and check that they match the Avro attributes if provided. It will also check that known incompatible Serde attributes result in a compile error instead of a runtime panic. Testing for the compile errors is done using `trybuild`. These tests run only on nightly as the output can vary between compiler versions (otherwise MSRV and latest stable could have different outputs and break the entire CI).
4efa998 to
392ae2c
Compare
|
A PR has been opened at Derling repo with an example how to parse We may borrow something useful from it. |
|
I've fixed all the feedback. I've also deprecated |
8bf46c4 to
1d802e5
Compare
martin-g
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
This commit changes the attribute parsing in
#[derive(AvroSchema)]to also use the Serde attributes. It will use the Serde attributes and check that they match the Avro attributes if provided. It will also check that known incompatible Serde attributes result in a compile error instead of a runtime panic.Testing for the compile errors is done using
trybuild. These tests run only on nightly as the output can vary between compiler versions (otherwise MSRV and latest stable could have different outputs and break the entire CI).For some reason Github closed #373, not sure why. This is the exact same commit.