KEMBAR78
[Rgen] Be consistent in the use of global when we encounter a nint/nuint. by mandel-macaque · Pull Request #22931 · dotnet/macios · GitHub
Skip to content

Conversation

@mandel-macaque
Copy link
Member

nint and nuint are meta types that point to IntPtr and UIntPtr. Due to that fact, we are not using the global::System.IntPtr string in the cases we find a nint. The way to fix this is to look at the special type, and if it matches IntPtr/UIntPtr, use the fully qualified name.

With this change we are consistent in all the generated code and we will always find global::System.IntPtr no matter if the user used nint or IntPtr.

nint and nuint are meta types that point to IntPtr and UIntPtr. Due to
that fact, we are not using the global::System.IntPtr string in the
cases we find a nint. The way to fix this is to look at the special
type, and if it matches IntPtr/UIntPtr, use the fully qualified name.

With this change we are consistent in all the generated code and we will
always find global::System.IntPtr no matter if the user used nint or
IntPtr.
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #30758e4] Build passed (Build packages) ✅

Pipeline on Agent
Hash: 30758e42ce78540a323f2783953df5c86c45439c [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

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

Pipeline on Agent
Hash: 30758e42ce78540a323f2783953df5c86c45439c [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@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: 30758e42ce78540a323f2783953df5c86c45439c [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #30758e4] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: 30758e42ce78540a323f2783953df5c86c45439c [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

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

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

Pipeline on Agent
Hash: 30758e42ce78540a323f2783953df5c86c45439c [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

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

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

Pipeline on Agent
Hash: 30758e42ce78540a323f2783953df5c86c45439c [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

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

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

Pipeline on Agent
Hash: 30758e42ce78540a323f2783953df5c86c45439c [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

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

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

Pipeline on Agent
Hash: 30758e42ce78540a323f2783953df5c86c45439c [PR build]

@mandel-macaque mandel-macaque changed the title [Rgen] Be consistent in the use of glbal when we encounter a nint/nuint. [Rgen] Be consistent in the use of global when we encounter a nint/nuint. May 29, 2025
@vs-mobiletools-engineering-service2
Copy link
Collaborator

🚀 [CI Build #30758e4] Test results 🚀

Test results

✅ All tests passed on VSTS: test results.

🎉 All 120 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 6 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 12 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: 30758e42ce78540a323f2783953df5c86c45439c [PR build]

@mandel-macaque mandel-macaque merged commit 7f4ad7c into main May 29, 2025
40 checks passed
@mandel-macaque mandel-macaque deleted the dev/mandel/consistent-global-nint-nuint branch May 29, 2025 02:10
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.

3 participants