Fix UndefVarError(ImVec2) in generated pOut wrappers#20
Merged
Conversation
Member
|
If it's only ImVec2 causing issues then I'd lean towards just adding it to the
This only happens if you set the target branch to the parent branch. |
e755c38 to
c0d9043
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #20 +/- ##
==========================================
+ Coverage 26.14% 28.22% +2.08%
==========================================
Files 5 5
Lines 960 960
==========================================
+ Hits 251 271 +20
+ Misses 709 689 -20 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
c0d9043 to
3500e8a
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Depends on #19. Branched off
aarch64-darwin-static-cfunc, so until #19 merges the diff shows all 6 commits; only the last two belong here. Diff cleans up automatically once #19 lands.ImGuiTestEngine.GetWindowTitlebarPoint("any-window")(andGetPosOnVoid/GetMainMonitorWorkPos/GetMainMonitorWorkSize) throwsUndefVarError:ImVec2not defined inImGuiTestEngine`` —src/wrapper.jlemits a bare `Ref{ImVec2}()` and `ImVec2` isn't bound at the wrapper module's scope. Bug pre-dates #19 — same four sites exist on `master`.Root cause: the
renameringen/generator.jlrewritesIm*symbols inside function-call args (@capture(x, f_(args__))) but skips curly type expressions likeRef{ImVec2}. The pOut boilerplate splices the raw ccall type into a curly, so the renamer never qualifies it.Fix: symmetric
elseif @capture(x, T_{params__})branch with the same rewrite. Regenerating givesRef{libig.ImVec2}()at the 4 load-bearing sites plus 16 cosmeticRef{ImGuiTestRef}→Ref{lib.ImGuiTestRef}rewrites (functionally identical via the existing top-of-file aliases).