Skip to content

[bgen] Fix strong enums with value type backing fields. #23077

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

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

rolfbjarne
Copy link
Member

We were generating the wrong code for strong enums backed by value type fields. We
thought the native symbol would be a pointer to the value, but it's the actual value
instead.

Also added a test to fetch all strong enum values using reflection.

This revealed that the UIAccessibilityTraits enum was bound incorrectly (wrong backing
type), so fix that. This required some compat code to not break binary compat.

rolfbjarne and others added 2 commits June 18, 2025 19:01
We were generating the wrong code for strong enums backed by value type fields. We
thought the native symbol would be a pointer to the value, but it's the actual value
instead.

Also added a test to fetch all strong enum values using reflection.

This revealed that the UIAccessibilityTraits enum was bound incorrectly (wrong backing
type), so fix that. This required some compat code to not break binary compat.
@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

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

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

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

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #3bb7199] Build passed (Build packages) ✅

Pipeline on Agent
Hash: 3bb7199f90cc892e233c39de33ae1e79f6d6db58 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

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

Pipeline on Agent
Hash: 3bb7199f90cc892e233c39de33ae1e79f6d6db58 [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: 3bb7199f90cc892e233c39de33ae1e79f6d6db58 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #3bb7199] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: 3bb7199f90cc892e233c39de33ae1e79f6d6db58 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

❌ [CI Build #3bb7199] Tests on macOS X64 - Mac Sonoma (14) failed ❌

Failed tests are:

  • monotouch-test

Pipeline on Agent
Hash: 3bb7199f90cc892e233c39de33ae1e79f6d6db58 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

❌ [CI Build #3bb7199] Tests on macOS M1 - Mac Monterey (12) failed ❌

Failed tests are:

  • monotouch-test

Pipeline on Agent
Hash: 3bb7199f90cc892e233c39de33ae1e79f6d6db58 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

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

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

Pipeline on Agent
Hash: 3bb7199f90cc892e233c39de33ae1e79f6d6db58 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

❌ [CI Build #3bb7199] Tests on macOS M1 - Mac Ventura (13) failed ❌

Failed tests are:

  • monotouch-test

Pipeline on Agent
Hash: 3bb7199f90cc892e233c39de33ae1e79f6d6db58 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🚀 [CI Build #60e4c12] Test results 🚀

Test results

✅ All tests passed on VSTS: test results.

🎉 All 118 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 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: 60e4c12db5c6f95ca81108a72d6ffe1a264c2f53 [PR build]

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.

2 participants