[AOT] Explore Alternatives to MakeGenericType/MakeGenericMethod For Web UI #45795
Closed
1 of 6 tasks
Labels
area-blazor
Includes: Blazor, Razor Components
enhancement
This issue represents an ask for new feature or an enhancement to an existing one
✔️ Resolution: Duplicate
Resolved as a duplicate of another issue
NativeAOT
Pillar: Technical Debt
Status: Resolved
Milestone
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
There are multiple uses of
MakeGenericType()
andMakeGenericMethod()
throughout theMicrosoft.AspNetCore.Components
andMicrosoft.JSInterop
projects that make them unsafe for AOT scenarios. Initially it was believed that the warnings surrounding these would be suppressible since these projects are already trim-safe, but there are multiple places where we cannot guarantee the safety of the suppression.During review of #45580, there was the suggestion of exploring a non-dynamic code fallback such as here. Further investigation found that the performance degradation would make this a poor approach when dealing with Blazor.
Describe the solution you'd like
The below uses of
MakeGenericMethod()
andMakeGenericType()
need to either have an AOT-safe fallback or a refactor (e.g. source generation) which allows these type-generic methods to not require JIT compilation.Microsoft.AspNetCore.Components
Microsoft.JSInterop
Additional context
Linked to #45578, the other part of Web UI's remaining work in #45473.
AOT analysis for these projects is already turned off by #45604.
The text was updated successfully, but these errors were encountered: