-
Notifications
You must be signed in to change notification settings - Fork 542
[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
base: main
Are you sure you want to change the base?
Conversation
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.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ [CI Build #3bb7199] Build passed (Build packages) ✅Pipeline on Agent |
✅ [PR Build #3bb7199] 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 #3bb7199] Build passed (Build macOS tests) ✅Pipeline on Agent |
❌ [CI Build #3bb7199] Tests on macOS X64 - Mac Sonoma (14) failed ❌Failed tests are:
Pipeline on Agent |
❌ [CI Build #3bb7199] Tests on macOS M1 - Mac Monterey (12) failed ❌Failed tests are:
Pipeline on Agent |
💻 [CI Build #3bb7199] Tests on macOS arm64 - Mac Sequoia (15) passed 💻✅ All tests on macOS arm64 - Mac Sequoia (15) passed. Pipeline on Agent |
❌ [CI Build #3bb7199] Tests on macOS M1 - Mac Ventura (13) failed ❌Failed tests are:
Pipeline on Agent |
🚀 [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 Pipeline on Agent |
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.