Skip to content
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

Fix get type for nullable enums and fix WUX projections #1701

Merged
merged 4 commits into from
Aug 5, 2024

Conversation

manodasanW
Copy link
Member

@manodasanW manodasanW commented Aug 3, 2024

  • In the previous PR for nullable, we fixed the scenario where WinUI asks for the type of the nullable version of built-in types. But it looks common for WinUI to do the same for nullable enums too. This expands the approach we take with WinRTExposedType to enums and addresses this issue via an interface that it internally implements to get the nullable version of the enum.
  • Also removing the throw we had in ResolveGenericType as we always catch that exception later and return null. It was there primarily as a hint, but given we now properly support nullable in this scenario and we have fallbacks for the other scenarios such as during RCW creation, removing it.
  • Noticed that the custom mapped WUX projections were missing the AOT attributes for WinRTExposedType, so adding them there.

Fixes #1697
Fixes #1702
Fixes #1623

@manodasanW
Copy link
Member Author

Working on doing a test to see if there is much impact to the size.

src/WinRT.Runtime/Projections/Nullable.cs Show resolved Hide resolved
src/WinRT.Runtime/Projections/Nullable.cs Show resolved Hide resolved
src/WinRT.Runtime/Projections/Nullable.cs Outdated Show resolved Hide resolved
src/WinRT.Runtime/Projections/Nullable.cs Show resolved Hide resolved
src/WinRT.Runtime/Projections/Nullable.cs Show resolved Hide resolved
src/WinRT.Runtime/Projections/Nullable.cs Outdated Show resolved Hide resolved
@manodasanW manodasanW merged commit a56fba4 into staging/AOT Aug 5, 2024
10 checks passed
@manodasanW manodasanW deleted the manodasanw/nullablenum branch August 5, 2024 05:50
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.

2 participants