-
Notifications
You must be signed in to change notification settings - Fork 554
[RGen] Keep the track of the enum member position. #23837
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
Conversation
This is needed by the transformer so that we can ensure that the enums are placed in the correct location when transforming APIs that might have diff memebers per platform.
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 adds index tracking to enum members in the RGen system to support the transformer's ability to maintain correct enum member positioning across platforms with different API availability.
Key changes:
- Added
Indexproperty to theEnumMemberstruct to track position - Updated constructors to accept and set the index parameter
- Modified enum processing to use indexed enumeration and pass position data
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/rgen/Microsoft.Macios.Generator/DataModel/EnumMember.cs |
Added Index property, default state handling, and updated equality/hash methods |
src/rgen/Microsoft.Macios.Generator/DataModel/EnumMember.Generator.cs |
Updated constructors to accept index parameter |
src/rgen/Microsoft.Macios.Transformer/DataModel/EnumMember.Transformer.cs |
Added index parameter to transformer constructor |
src/rgen/Microsoft.Macios.Generator/DataModel/Binding.Generator.cs |
Modified enum processing to use indexed enumeration |
src/rgen/Microsoft.Macios.Transformer/DataModel/Binding.Transformer.cs |
Updated to pass index during enum member creation |
| Test files | Updated all test constructors and expected outputs to include index parameter |
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.
✅ [PR Build #bb826cf] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ [CI Build #bb826cf] Build passed (Build packages) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
✅ 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 #bb826cf] Build passed (Build macOS tests) ✅Pipeline on Agent |
💻 [CI Build #bb826cf] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
💻 [CI Build #bb826cf] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
💻 [CI Build #bb826cf] Tests on macOS arm64 - Mac Sequoia (15) passed 💻✅ All tests on macOS arm64 - Mac Sequoia (15) passed. Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
💻 [CI Build #bb826cf] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
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 #bb826cf] Test results 🔥Test results❌ Tests failed on VSTS: test results 1 tests crashed, 0 tests failed, 114 tests passed. Failures❌ monotouch tests (macOS)🔥 Failed catastrophically on VSTS: test results - monotouch_macos (no summary found). Html Report (VSDrops) Download Successes✅ cecil: All 1 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
|
monotouch tests (macOS) failures are unrelated to code changes. |
This is needed by the transformer so that we can ensure that the enums are placed in the correct location when transforming APIs that might have diff members per platform.