Skip to content

feat(compiler): handle nested container ref pointer options in C++ compiler correctly#3735

Open
BaldDemian wants to merge 1 commit into
apache:mainfrom
BaldDemian:cpp-nested-container
Open

feat(compiler): handle nested container ref pointer options in C++ compiler correctly#3735
BaldDemian wants to merge 1 commit into
apache:mainfrom
BaldDemian:cpp-nested-container

Conversation

@BaldDemian
Copy link
Copy Markdown
Contributor

@BaldDemian BaldDemian commented Jun 3, 2026

Why?

The C++ compiler should correctly apply ref pointer options for nested container element/value references.

Additional note:

When submitting PR 3731, I did not notice that Fory currently only supports nested collection types in C++:

Nested collection support is target-capability based. The C++ generator accepts
nested collection specs such as `list<list<...>>`, `list<map<...>>`, and
`map<..., list<...>>`; targets that have not implemented nested field specs
continue to reject them. Use a message wrapper when you need portable schemas
across all targets.

However, since that PR merely added a piece of defensive programming logic, it may not need to be reverted.

Similar issues also exist in the Python and JavaScript compilers. However, since they do not support nested container types, I have not fixed them for now.

What does this PR do?

  • Handle nested container ref pointer options correctly.
  • Add corresponding testcase.

Related issues

N/A.

AI Contribution Checklist

  • Substantial AI assistance was used in this PR: no
  • If yes, I included a completed AI Contribution Checklist in this PR description and the required AI Usage Disclosure.
  • If yes, my PR description includes the required ai_review summary 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?

N/A.

Benchmark

N/A.

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.

1 participant