Closed thake closed 3 years ago
@sksamuel I changed the API a little bit and removed the deprecated bits. As you designed the API, I would be very happy if you can take a look at the changes.
Hey @sksamuel, do you think you'll have the time to look at this PR? Otherwise, I will just go forward and merge this PR soon.
If you're happy to merge it, then please do. I'm back from vacation now, and just catching up. I will setup the creds tomorrow or Tuesday and add github actions to release.
On Sun, 8 Nov 2020 at 22:31, Thorsten Hake notifications@github.com wrote:
Hey @sksamuel https://github.com/sksamuel, do you think you'll have the time to look at this PR? Otherwise, I will just go forward and merge this PR soon.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/avro-kotlin/avro4k/pull/75#issuecomment-723747246, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFVSGUWVNZ3L7HUSK2AMR3SO5WBBANCNFSM4SWQLJDQ .
Reworked Avro encoding and decoding API in order to have type safety for required encoding / decoding settings.
The following code would perfectly compile:
but at runtime an exception will be thrown because the readerSchema needs to be set for BinaryFormat.
To prevent this wrong API usage, the API has been redesigned so that the compiler can detect these errors. The call would look like this with the new API: