Skip to content

Conversation

@Sergio0694
Copy link
Member

Related to #1460 (comment). This PR drops the [DynamicallyAccessedMembers] use from Marshaler<T>.AbiType, which was not needed and was causing a lot of unnecessary stuff to be preserved unnecessarily (for explicit T types that were not helper types). The public members for the helper types are already preserved separately, and this attribute was only used to suppress warnings within the static constructor. I've changed the logic there to just flow the annitations through a local variable instead.

@Sergio0694
Copy link
Member Author

Saves 51 KB on .NET 9! 🎉

image

@Sergio0694 Sergio0694 merged commit 53dcb5d into staging/AOT Jan 22, 2024
@Sergio0694 Sergio0694 deleted the user/sergiopedri/drop-marshaler-abitype-dam branch January 22, 2024 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants