feat(compiler): add csharp target and idl integration tests#3406
Merged
chaokunyang merged 7 commits intoapache:mainfrom Feb 25, 2026
Merged
feat(compiler): add csharp target and idl integration tests#3406chaokunyang merged 7 commits intoapache:mainfrom
chaokunyang merged 7 commits intoapache:mainfrom
Conversation
urlyy
approved these changes
Feb 25, 2026
5fb88b9 to
36c08e4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why?
Add full C# schema IDL support end-to-end in Apache Fory: compiler target, documentation, runtime compatibility fixes, and integration coverage (including root/package cross-reference and file-based roundtrip scenarios).
What does this PR do?
foryc --lang ... ,csharpforyc --csharp_out=<dir>option csharp_namespace = "..."compiler/fory_compiler/generators/csharp.py) for messages/enums/unions, registration helpers, and generatedToBytes/FromByteshelpers.compiler/fory_compiler/tests/test_csharp_generator.py) covering namespace resolution, registration behavior, field encoding attributes, imported registration calls, and parser option support.integration_tests/idl_tests/csharp/IdlTestsand runnerintegration_tests/idl_tests/run_csharp_tests.sh, including schema-consistent and compatible roundtrips across:addressbook,auto_id,complex_pbprimitivesoptional_typesany_example(.fdl) andany_example(.proto)monster,complex_fbs)tree,graph)root.idl) and generated bytes helper pathsintegration_tests/idl_tests/generate_idl.py.compiler/README.md,docs/compiler/*) and C# README to document C# codegen, options, generated output, and test workflow.Related issues
#1017
#3387
Does this PR introduce any user-facing change?
Yes.
forycnow supports C# generation (--lang csharp,--csharp_out) and C# namespace override (csharp_namespace), with updated compiler docs and C# IDL test workflow.Benchmark
N/A (feature + compatibility work; no benchmark updates in this PR)