Skip to content
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

"sinceVersion" is not checked against schema version during code generation #902

Closed
entangled90 opened this issue Jun 10, 2022 · 0 comments
Labels

Comments

@entangled90
Copy link

When adding a new field it's usually added with a sinceVersion attribute, but it may happen by error that the version of the schema is not bumped.
This leads to issues when decoding the field as the field is encoded correctly and is decoded correctly using OTF decoder (it probably skip sinceVersion checks?)
However the generated Java decoders skip this field as it was encoded with a previous version.

I suggest to check during code generation to check if the field version is strictly greater than the schema version as it's probably a bug.

I propose to just fail code generation if this situation occurs so that the schema version can be bumped manually.

If you can point me where it's best to implement this check I can create a pull request myself.

Hope this helps, thank you for all the work!

@entangled90 entangled90 changed the title _sinceVersion_ is not checked against _schemaVersion_ during code generation "sinceVersion" is not checked against schema version during code generation Jun 10, 2022
@mjpt777 mjpt777 added the bug label Jun 13, 2022
mjpt777 added a commit that referenced this issue Jun 21, 2022
@mjpt777 mjpt777 closed this as completed Jun 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants