Repository navigation
THRIFT-6445: Add ability to mark enums as flags - #4040
SLAVONchick wants to merge 1 commit into
Conversation
Client: py,netstd Generate Flags attributes for C# and Flag or IntFlag classes for Python. Preserve unknown flag bits across schema versions and avoid collisions between generated enum names and imported flag base classes. Handle flag serialization in containers and immutable structures, using generated codecs where the dynamic and accelerated codecs lose flag types. Add compiler regression tests and document the annotation. Validation: compiler build and all 20 compiler CTest tests passed; git diff --check passed. make style is unavailable in this CMake setup. Co-Authored-By: OpenAI Codex (GPT-6) <noreply@openai.com>
|
The AppVeyor failure appears unrelated to this change: |
Code reviewNo blocking issues found. Checked for bugs and CLAUDE.md compliance. Three suggestions and a note, below the bar for an issue but verified with code generated by this PR's compiler (Python 3.10, 3.12 and 3.14):
thrift/compiler/cpp/src/thrift/generate/t_py_generator.cc Lines 637 to 658 in 7b0033d
Lines 76 to 80 in 7b0033d
thrift/compiler/cpp/src/thrift/generate/t_py_generator.cc Lines 1020 to 1026 in 7b0033d
🤖 Generated with Claude Code |
Client: py,netstd
Generate Flags attributes for C# and Flag or IntFlag classes for Python. Preserve unknown flag bits across schema versions and avoid collisions between generated enum names and imported flag base classes.
Handle flag serialization in containers and immutable structures, using generated codecs where the dynamic and accelerated codecs lose flag types. Add compiler regression tests and document the annotation.
Validation: compiler build and all 20 compiler CTest tests passed; git diff --check passed. make style is unavailable in this CMake setup.
[skip ci]anywhere in the commit message to free up build resources. - N/A