-
Notifications
You must be signed in to change notification settings - Fork 522
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
[BGen] Fix argument tests for generic types. #22453
Conversation
Generic parameter types are speciald and in reflection do not show as the Type that was given as a constrain. This is problematic becasue the generator tests for IsWrappedType or IsNativeObject do not work on a generic type. This is a patch to get the curretn bindings working with generic parameters from generic classes. Once this is landed we will be able to detect if the types is a wrapped one and we can call GC.KeepAlive when needed.
|
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.
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.
Maybe add a test?
@rolfbjarne will do, there are a few bindings affected too |
✅ [CI Build #9a194cc] Build passed (Build packages) ✅Pipeline on Agent |
✅ [PR Build #9a194cc] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ [CI Build #9a194cc] Build passed (Build macOS tests) ✅Pipeline on Agent |
💻 [CI Build #9a194cc] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
💻 [CI Build #9a194cc] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
💻 [CI Build #9a194cc] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
💻 [CI Build #9a194cc] Tests on macOS arm64 - Mac Sequoia (15) passed 💻✅ All tests on macOS arm64 - Mac Sequoia (15) passed. Pipeline on Agent |
✅ API diff for current PR / commit.NET ( No breaking changes )❗ API diff vs stable (Breaking changes).NET ( ❗ Breaking changes ❗ )ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
🔥 [CI Build #9a194cc] Test results 🔥Test results❌ Tests failed on VSTS: test results 0 tests crashed, 1 tests failed, 117 tests passed. Failures❌ monotouch tests (macOS) [attempt 2]
Html Report (VSDrops) Download Successes✅ cecil: All 1 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
Generic parameter types are special and in reflection do not show as the Type that was given as a constrain. This is problematic because the generator tests for IsWrappedType or IsNativeObject do not work on a generic type.
This is a patch to get the current bindings working with generic parameters from generic classes. Once this is landed we will be able to detect if the types is a wrapped one and we can call GC.KeepAlive when needed.