Skip to content

[JsonGen] Fix enum index - #328

Merged
sebaszm merged 2 commits into
masterfrom
development/fix-enum-index
Sep 3, 2026
Merged

[JsonGen] Fix enum index#328
sebaszm merged 2 commits into
masterfrom
development/fix-enum-index

Conversation

@sebaszm

@sebaszm sebaszm commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@sebaszm
sebaszm requested review from nxtum and a lite review from Copilot September 3, 2026 09:18

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.

🟡 Changes recommended

The new enum local declaration causes a duplicate C++ variable definition in the existing JsonEnum conversion path, which will fail compilation.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates the JSON-RPC code generator’s FromString() emission logic so enum parameters are handled in the local-variable emission path (aligning enums with integers/booleans during local setup).

Changes:

  • Extend EmitLocals() to treat JsonEnum similarly to integer/boolean types for local variable declaration.
File summaries
File Description
JsonGenerator/source/rpc_emitter.py Adds JsonEnum to the EmitLocals() type handling in FromString() so enum locals are emitted.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

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

Comment thread JsonGenerator/source/rpc_emitter.py
Copilot AI review requested due to automatic review settings September 3, 2026 09:31

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.

🟢 Approval recommended

The changes are small, consistent with existing integer/boolean handling, and directly address enum local scoping/redeclaration in generated output.

Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

JsonGenerator Results

View Results

No changes detected.

@sebaszm
sebaszm merged commit 269cbf4 into master Sep 3, 2026
129 checks passed
@sebaszm
sebaszm deleted the development/fix-enum-index branch September 3, 2026 10:08
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 3, 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.

3 participants