feat(dart): support nested container field codec for dart#3641
Merged
chaokunyang merged 15 commits intoMay 1, 2026
Conversation
urlyy
approved these changes
May 1, 2026
urlyy
approved these changes
May 1, 2026
…_field_for_go # Conflicts: # dart/packages/fory-test/test/cross_lang_test/xlang_test_main.dart
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?
Dart needs a canonical field type annotation surface that can describe nested container element/key/value semantics, including fixed-width and encoded numeric types, without relying on separate numeric wrapper annotations. The schema fingerprint calculation also needs to include nested container type IDs consistently across runtimes so compatible/schema-version checks agree for annotated nested containers.
What does this PR do?
ForyField(type: ...),MapField,ListType, scalar type specs, and generated support for nested element/key/value metadata.intfields with explicit Fory type specs for fixed-width integer semantics, while keeping exact-width wrapper classes where the Dart runtime still requires them.Related issues
#1017
#3630
#3625
#3630
#3636
#3639
#3640
AI Contribution Checklist
yes/noyes, I included a completed AI Contribution Checklist in this PR description and the requiredAI Usage Disclosure.yes, my PR description includes the requiredai_reviewsummary and screenshot evidence of the final clean AI review results from both fresh reviewers on the current PR diff or current HEAD after the latest code changes.Does this PR introduce any user-facing change?
This changes the Dart annotation/type-spec surface for fixed-width numeric and nested container field declarations. It updates schema fingerprint calculation to include nested container metadata consistently, but does not intentionally change the xlang binary protocol format.
Benchmark