Skip to content

[StubGen] Fix optional vectors (#323) (#324) - #329

Merged
Karthick-Somasundaresan merged 1 commit into
R4_4-RDKfrom
fix/RDKEMW-23898
Sep 8, 2026
Merged

Karthick-Somasundaresan merged 1 commit into
R4_4-RDKfrom
fix/RDKEMW-23898

Conversation

@Karthick-Somasundaresan

@Karthick-Somasundaresan Karthick-Somasundaresan commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

This is a backport from R4_4
It addresses an issue where a method's parameter is an optionalType and is empty; IsSet returns true.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Changes affect core RPC stub/proxy code generation behavior and could have broad downstream compilation/runtime impact that warrants final human verification.

Pull request overview

This PR updates the ProxyStubGenerator’s code generation for OptionalType<std::vector<...>> parameters to correctly construct/populate vectors when optional values are present, and to reset optionals when absent, avoiding stale data across calls.

Changes:

  • In stub-side input deserialization, populate optional vectors via a temporary vector object and move-assign into the optional wrapper.
  • In proxy-side output deserialization, read vectors into either the target vector (clearing first) or a temporary vector for optionals, then move-assign.
  • When an optional value is not present on the wire (boolean false), explicitly reset the optional parameter to its default-constructed state.
File summaries
File Description
ProxyStubGenerator/StubGenerator.py Fixes generation logic for optional dynamic arrays (vectors) during read/assignment in both stub and proxy paths, including resetting absent optionals.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@Karthick-Somasundaresan
Karthick-Somasundaresan merged commit cf40bf9 into R4_4-RDK Sep 8, 2026
3 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants