Skip to content

[RGen] Add a ArgumentForParameter method to create ArgumentSyntax from the parameter info. #23044

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

Merged
merged 2 commits into from
Jun 13, 2025

Conversation

mandel-macaque
Copy link
Member

This is a helper method that knows how to handle the ref kind and will create the correct argument syntax. This can later be used to create the arguments in a more elegant way.

mandel-macaque and others added 2 commits June 13, 2025 13:01
…m the parameter info.

This is a helper method that knows how to handle the ref kind and will
create the correct argument syntax. This can later be used to create the
arguments in a more elegant way.
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #68530d6] Build passed (Build packages) ✅

Pipeline on Agent
Hash: 68530d6e15cfdfa6ba09b4c44974de3c043851f2 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

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

Pipeline on Agent
Hash: 68530d6e15cfdfa6ba09b4c44974de3c043851f2 [PR build]

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

@vs-mobiletools-engineering-service2

This comment has been minimized.

@mandel-macaque mandel-macaque requested a review from Copilot June 13, 2025 18:15
Copy link
Contributor

@Copilot 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 introduces a helper method in BindingSyntaxFactory to generate ArgumentSyntax objects from parameter information, including handling ref kinds, to simplify and standardize argument creation.

  • Added ArgumentForParameter methods with overloads in BindingSyntaxFactory.cs
  • Added tests verifying the syntax output for various ReferenceKind values in BindingSyntaxFactoryRuntimeTests.cs

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tests/rgen/Microsoft.Macios.Generator.Tests/Emitters/BindingSyntaxFactoryRuntimeTests.cs Added tests for ArgumentSyntax creation using different ReferenceKinds
src/rgen/Microsoft.Macios.Generator/Emitters/BindingSyntaxFactory.cs Introduced helper methods to create ArgumentSyntax based on parameter information

@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 #68530d6] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: 68530d6e15cfdfa6ba09b4c44974de3c043851f2 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

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

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

Pipeline on Agent
Hash: 68530d6e15cfdfa6ba09b4c44974de3c043851f2 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

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

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

Pipeline on Agent
Hash: 68530d6e15cfdfa6ba09b4c44974de3c043851f2 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

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

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

Pipeline on Agent
Hash: 68530d6e15cfdfa6ba09b4c44974de3c043851f2 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

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

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

Pipeline on Agent
Hash: 68530d6e15cfdfa6ba09b4c44974de3c043851f2 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🚀 [CI Build #d8f4b53] Test results 🚀

Test results

✅ All tests passed on VSTS: test results.

🎉 All 115 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 9 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: d8f4b5347c5cf2908cfe8bbaee582a87ac0a9963 [PR build]

@mandel-macaque mandel-macaque merged commit 45dfbc3 into main Jun 13, 2025
34 of 38 checks passed
@mandel-macaque mandel-macaque deleted the dev/mandel/argument-ref-kind branch June 13, 2025 19:19
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.

4 participants