Skip to content

Conversation

@mandel-macaque
Copy link
Contributor

@mandel-macaque mandel-macaque commented Sep 17, 2025

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.

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.
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 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 Index property to the EnumMember struct 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

@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

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

Pipeline on Agent
Hash: bb826cf68514067ad2a4d1c4ced43494a29a9804 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

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

Pipeline on Agent
Hash: bb826cf68514067ad2a4d1c4ced43494a29a9804 [PR build]

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

@vs-mobiletools-engineering-service2
Copy link
Collaborator

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

Pipeline on Agent
Hash: bb826cf68514067ad2a4d1c4ced43494a29a9804 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

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

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

Pipeline on Agent
Hash: bb826cf68514067ad2a4d1c4ced43494a29a9804 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

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

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

Pipeline on Agent
Hash: bb826cf68514067ad2a4d1c4ced43494a29a9804 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

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

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

Pipeline on Agent
Hash: bb826cf68514067ad2a4d1c4ced43494a29a9804 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

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

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

Pipeline on Agent
Hash: bb826cf68514067ad2a4d1c4ced43494a29a9804 [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
Copy link
Collaborator

🔥 [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
✅ 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 10 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 15 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: bb826cf68514067ad2a4d1c4ced43494a29a9804 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@mandel-macaque
Copy link
Contributor Author

monotouch tests (macOS) failures are unrelated to code changes.

@mandel-macaque mandel-macaque merged commit c9294bb into main Sep 18, 2025
38 of 40 checks passed
@mandel-macaque mandel-macaque deleted the dev/mandel/enum-member-index-null branch September 18, 2025 21:14
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.

5 participants