Sync bugfixes from 4.4.6 backport#275
Merged
Merged
Conversation
LuaGenerator ResultsChanges detected. |
Contributor
There was a problem hiding this comment.
Pull request overview
Backports a set of generator bugfixes from the 4.4.6 line into ThunderTools, primarily improving ProxyStubGenerator include/parsing behavior and JsonGenerator’s handling of optionals/legacy index semantics and documentation output.
Changes:
- ProxyStubGenerator: track instantiated template usage to avoid emitting unused template proxystubs; enhance
@insertprocessing (including weak includes) and file/line tracking. - JsonGenerator: deduplicate tracker ordering, standardize “common objects” access, refine optional handling and legacy index behavior, and improve documentation type rendering.
- Misc: small formatting/logging tweaks across emitters.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| ProxyStubGenerator/StubGenerator.py | Filters unused instantiated template interfaces; adjusts emitted interface list and file cleanup; updates include handling. |
| ProxyStubGenerator/default.h | Adds weak include hook and legacy forward-decls comment. |
| ProxyStubGenerator/CppParser.py | Adds ref-counting for instantiated templates; improves token/file/line handling; rewrites include loader with weak includes. |
| JsonGenerator/source/trackers.py | Dedupes dependency sorting and exposes common objects via properties. |
| JsonGenerator/source/rpc_emitter.py | Switches to local_name usage, adjusts legacy optional/index handling, and fixes buffer-length fallback logic. |
| JsonGenerator/source/json_loader.py | Makes local_proto robust when @proto is absent; fixes cv-qualified native type accessor. |
| JsonGenerator/source/header_loader.py | Extends optional handling for bool; refines @extract and event index warnings/original-name behavior. |
| JsonGenerator/source/documentation_generator.py | Improves optional propagation and type labeling for opaque/encode/time; fixes minor formatting. |
| JsonGenerator/source/class_emitter.py | Updates to new tracker APIs and adds more detailed enum emission logging. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
JsonGenerator ResultsChanges detected. |
LuaGenerator ResultsChanges detected. |
JsonGenerator ResultsChanges detected. |
LuaGenerator ResultsChanges detected. |
ProxyStubGenerator ResultsChanges detected. |
JsonGenerator ResultsChanges detected. |
JsonGenerator ResultsChanges detected. |
LuaGenerator ResultsChanges detected. |
ProxyStubGenerator ResultsChanges detected. |
JsonGenerator ResultsChanges detected. |
LuaGenerator ResultsChanges detected. |
ProxyStubGenerator ResultsChanges detected. |
JsonGenerator ResultsChanges detected. |
Comment on lines
492
to
495
| emit.Line("const size_t _dot = %s.find('.');" % (names.designator)) | ||
| emit.Line("const string %s = %s.substr(0, _dot);" % (names.designator_id, names.designator)) | ||
| emit.Line("const string %s = %s.substr(0, _dot);" % (names.index, names.designator)) | ||
| check = ("%s.substr(_dot + 1)" % (names.designator)) | ||
| cond.append("((%s.empty() == true) || (%s == %s))" % (names.client, names.client, check)) |
VeithMetro
approved these changes
Jun 22, 2026
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.
A number of bug fixes and one extra feature: proper include handling of stubgen:include (now works as in normal compilers, includes in-place of the directive).