Skip to content

Conversation

jonflynng
Copy link

@jonflynng jonflynng commented Sep 25, 2024

This PR updates Scrooge to be compatible with the ENUM representation changes introduced in Thrift 0.19.0 (link here), while maintaining backward compatibility with older Thrift versions.

Key changes:

  1. Updated TLazyBinaryProtocol to recognize and handle the new ENUM type identifier (-1) introduced in Thrift 0.19.0:
  • Modified readFieldBegin to correctly interpret the new ENUM type identifier.
  • Adjusted writeFieldBegin to use the new ENUM type identifier when writing ENUM fields.

These changes ensure that Scrooge can correctly read and write ENUM types when working with Thrift 0.19.0, while still maintaining compatibility with older Thrift versions that use the previous ENUM type identifier (16).

Testing:

  • Added unit tests to verify correct reading and writing of ENUM types with both old and new type identifiers.
  • Tested with existing Thrift definitions to ensure backward compatibility.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Jonathan Flynn seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@jonflynng jonflynng marked this pull request as ready for review September 26, 2024 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants