-
Notifications
You must be signed in to change notification settings - Fork 107
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
Disable and trim 'Marshaler<T>' on Native AOT #1907
base: staging/2.3
Are you sure you want to change the base?
Conversation
Should we make this pay-for-play instead (using a feature flag, for instance) rather than a complete breaking change? |
@dongle-the-gadget there's two considerations for why we're not doing that:
|
@@ -83,9 +145,18 @@ public static object FromAbi(IntPtr ptr) | |||
|
|||
public static unsafe object GetValue(IInspectable inspectable) | |||
{ | |||
#if NET |
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.
I need to double check what our behavior here is today when boxed arrays are marshaled from native side.
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.
This type should never be used on AOT (I left some comments above the type explaining it). Unless I'm missing some way it could still somehow end up being referenced on NAOT? I couldn't find any possible entry points though 🤔
This type is super cursed and causes a ton of code to be rooted. It's also not really needed anymore on Native AOT. This PR makes its static constructor throw right away on Native AOT, allowing all its code to be removed. This should save a fair amount 🤞