Skip to content

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

Closed
@entangled90

Description

@entangled90

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions