-
Notifications
You must be signed in to change notification settings - Fork 547
[RGen] Fix missing 'global::' when using New. #22893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RGen] Fix missing 'global::' when using New. #22893
Conversation
Rather than take its own parameter, is better to relay in the method that returns the identifier of a type which is used all over the code generator and ensures that we will be consistent. Tests have been updated to reflect the change.
There was a problem hiding this comment.
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 refactors the code generation process to consistently apply the global qualifier by using a helper method that returns the fully qualified type identifier instead of taking a separate parameter. Key changes include replacing hard-coded global qualifiers in string interpolation, removing the redundant global flag parameter in relevant methods, and updating tests to reflect these changes.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/rgen/Microsoft.Macios.Generator.Tests/Emitters/BindingSyntaxFactoryTrampolineTests.cs | Updated trampoline test to use the Global() method for generating fully qualified identifiers. |
| tests/rgen/Microsoft.Macios.Generator.Tests/Emitters/BindingSyntaxFactoryRuntimeTests.cs | Updated runtime tests to reflect the removal of the global flag parameter and the use of the Global() method. |
| src/rgen/Microsoft.Macios.Generator/Emitters/BindingSyntaxFactory.Trampoline.cs | Adjusted call to New() by removing the global flag parameter from the method call. |
| src/rgen/Microsoft.Macios.Generator/Emitters/BindingSyntaxFactory.Runtime.cs | Updated the New() method signature to remove the global flag parameter and now relies on the type's identifier syntax; however, XML documentation still references the removed parameter. |
Comments suppressed due to low confidence (1)
src/rgen/Microsoft.Macios.Generator/Emitters/BindingSyntaxFactory.Runtime.cs:492
- The XML documentation for the 'New' method still references the 'global' parameter, which has been removed from the method signature. Please update the documentation to accurately describe the method's parameters.
/// <param name="global">If the global qualifier should be used.</param>
✅ [CI Build #fd708b7] Build passed (Build packages) ✅Pipeline on Agent |
✅ [PR Build #fd708b7] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ API diff for current PR / commit.NET ( No breaking changes )✅ API diff vs stable.NET ( No breaking changes )ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
✅ [CI Build #fd708b7] Build passed (Build macOS tests) ✅Pipeline on Agent |
💻 [CI Build #fd708b7] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
💻 [CI Build #fd708b7] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
💻 [CI Build #fd708b7] Tests on macOS arm64 - Mac Sequoia (15) passed 💻✅ All tests on macOS arm64 - Mac Sequoia (15) passed. Pipeline on Agent |
💻 [CI Build #fd708b7] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
🚀 [CI Build #fd708b7] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 115 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
Rather than take its own parameter, is better to relay in the method that returns the identifier of a type which is used all over the code generator and ensures that we will be consistent.
Tests have been updated to reflect the change.