[JsonGen] Use same includes as StubGen#300
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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 toNoneand 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.
JsonGenerator ResultsChanges detected. |
LuaGenerator ResultsNo changes detected. |
Contributor
There was a problem hiding this comment.
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
--dumpCLI flag is parsed but never used, so it currently has no effect. Either wire it up (e.g., callCppParser.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])
LuaGenerator ResultsNo changes detected. |
LuaGenerator ResultsNo changes detected. |
JsonGenerator ResultsChanges detected. |
ProxyStubGenerator ResultsChanges detected. |
VeithMetro
approved these changes
Jul 16, 2026
JsonGenerator ResultsChanges detected. |
ProxyStubGenerator ResultsChanges detected. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
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.