Skip to content

[JsonGen] Use same includes as StubGen#300

Merged
sebaszm merged 5 commits into
masterfrom
development/sync-included-files
Jul 16, 2026
Merged

[JsonGen] Use same includes as StubGen#300
sebaszm merged 5 commits into
masterfrom
development/sync-included-files

Conversation

@sebaszm

@sebaszm sebaszm commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Make sure JsonGenerator uses same default include files as StubGenerator. This also allows to properly resolve COM IDs now so they are properly placed in Exchange (or any other specifed namespace) avoiding potential clashes.

Copilot AI review requested due to automatic review settings July 16, 2026 12:26

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.

Pull request overview

This PR updates JsonGenerator’s header parsing so it uses the same default include set as StubGenerator, improving resolution of COM IDs and reducing namespace/ID collisions.

Changes:

  • Avoids mutable default arguments in json_loader.Load() by switching defaults to None and initializing per-call lists.
  • Updates header parsing to include additional, module-local headers (Module.h, Ids.h) alongside the default definitions file when building the parser input list.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
JsonGenerator/source/json_loader.py Makes Load() argument defaults safe by avoiding shared mutable lists.
JsonGenerator/source/header_loader.py Adds Module.h/Ids.h to the parsed header set to match StubGenerator’s include behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread JsonGenerator/source/json_loader.py Outdated
Comment thread JsonGenerator/source/header_loader.py Outdated
@github-actions

Copy link
Copy Markdown

JsonGenerator Results

View Results

Changes detected.

Copilot AI review requested due to automatic review settings July 16, 2026 12:45
@github-actions

Copy link
Copy Markdown

LuaGenerator Results

View Results

No changes detected.

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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

Comment thread JsonGenerator/source/header_loader.py
Comment thread ProxyStubGenerator/StubGenerator.py
Comment thread ProxyStubGenerator/StubGenerator.py
Copilot AI review requested due to automatic review settings July 16, 2026 12:52

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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

ProxyStubGenerator/StubGenerator.py:3003

  • The new --dump CLI flag is parsed but never used, so it currently has no effect. Either wire it up (e.g., call CppParser.DumpTree(tree) after parsing) or remove the option to avoid a misleading interface.
                        output_file = os.path.join(os.path.dirname(source_file) if not OUTDIR else OUTDIR,
                            PROXYSTUB_CPP_NAME % CreateName(os.path.basename(source_file)).split(".", 1)[0])

Comment thread JsonGenerator/source/header_loader.py
Comment thread JsonGenerator/source/header_loader.py
Copilot AI review requested due to automatic review settings July 16, 2026 12:58
@github-actions

Copy link
Copy Markdown

LuaGenerator Results

View Results

No changes detected.

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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings July 16, 2026 13:02
@github-actions

Copy link
Copy Markdown

LuaGenerator Results

View Results

No changes detected.

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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@github-actions

Copy link
Copy Markdown

JsonGenerator Results

View Results

Changes detected.

@github-actions

Copy link
Copy Markdown

ProxyStubGenerator Results

View Results

Changes detected.

@github-actions

Copy link
Copy Markdown

JsonGenerator Results

View Results

Changes detected.

@github-actions

Copy link
Copy Markdown

ProxyStubGenerator Results

View Results

Changes detected.

@sebaszm
sebaszm merged commit 6948990 into master Jul 16, 2026
153 of 154 checks passed
@sebaszm
sebaszm deleted the development/sync-included-files branch July 16, 2026 15:12
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 16, 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