KEMBAR78
[RGen] Fix missing 'global::' when using New. by mandel-macaque · Pull Request #22893 · dotnet/macios · GitHub
Skip to content

Conversation

@mandel-macaque
Copy link
Member

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.

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.
@mandel-macaque mandel-macaque requested a review from Copilot May 23, 2025 22:53
Copy link
Contributor

Copilot AI left a 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>

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #fd708b7] Build passed (Build packages) ✅

Pipeline on Agent
Hash: fd708b70b10d9cf2c3e2eea0917f4de12456f947 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [PR Build #fd708b7] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: fd708b70b10d9cf2c3e2eea0917f4de12456f947 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ API diff for current PR / commit

.NET ( No breaking changes )

✅ API diff vs stable

.NET ( No breaking changes )

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: fd708b70b10d9cf2c3e2eea0917f4de12456f947 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #fd708b7] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: fd708b70b10d9cf2c3e2eea0917f4de12456f947 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #fd708b7] Tests on macOS X64 - Mac Sonoma (14) passed 💻

All tests on macOS X64 - Mac Sonoma (14) passed.

Pipeline on Agent
Hash: fd708b70b10d9cf2c3e2eea0917f4de12456f947 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #fd708b7] Tests on macOS M1 - Mac Monterey (12) passed 💻

All tests on macOS M1 - Mac Monterey (12) passed.

Pipeline on Agent
Hash: fd708b70b10d9cf2c3e2eea0917f4de12456f947 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #fd708b7] Tests on macOS arm64 - Mac Sequoia (15) passed 💻

All tests on macOS arm64 - Mac Sequoia (15) passed.

Pipeline on Agent
Hash: fd708b70b10d9cf2c3e2eea0917f4de12456f947 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #fd708b7] Tests on macOS M1 - Mac Ventura (13) passed 💻

All tests on macOS M1 - Mac Ventura (13) passed.

Pipeline on Agent
Hash: fd708b70b10d9cf2c3e2eea0917f4de12456f947 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🚀 [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
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 4 tests passed. Html Report (VSDrops) Download
✅ linker: All 44 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 8 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 11 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 9 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 8 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: fd708b70b10d9cf2c3e2eea0917f4de12456f947 [PR build]

@mandel-macaque mandel-macaque merged commit 4d24b77 into main May 27, 2025
44 checks passed
@mandel-macaque mandel-macaque deleted the dev/mandel/missing-global-return-delegate branch May 27, 2025 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants