Skip to content

feat(compiler): add evolution option support#3262

Merged
chaokunyang merged 6 commits intoapache:mainfrom
chaokunyang:add_evolution_option_support
Feb 4, 2026
Merged

feat(compiler): add evolution option support#3262
chaokunyang merged 6 commits intoapache:mainfrom
chaokunyang:add_evolution_option_support

Conversation

@chaokunyang
Copy link
Collaborator

@chaokunyang chaokunyang commented Feb 4, 2026

Why?

  • Add a cross-language way to disable schema evolution for stable messages/structs to avoid compatible metadata overhead.
  • Let IDL files set a default evolving behavior that generators and runtimes can honor consistently.

What does this PR do?

  • Adds evolving to FDL/proto file options and message options, plus generator logic to compute the effective value.
  • Emits evolving-disabled annotations/macros/decorators in codegen for C++, Go, Java, Python, and Rust (new @ForyObject and pyfory.dataclass support).
  • Updates runtime type resolution to choose STRUCT vs COMPATIBLE_STRUCT (and named variants) based on the evolving flag; adds per-language tests for overrides and new IDL roundtrip cases.
  • Updates schema evolution docs and compiler schema reference; removes the old type-system doc stub.

Related issues

#3099
#1017
#2906
#2982

Does this PR introduce any user-facing change?

  • Does this PR introduce any public API change?
  • Does this PR introduce any binary protocol compatibility change?

Benchmark

@chaokunyang chaokunyang merged commit bf7bc51 into apache:main Feb 4, 2026
61 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants